I really want to have an idle animation with my Tommy gun, but the way I've tried doesn't work, so if you have any idle animation scripts that go with onEquipped, pls help! Here is what I have:
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
local anim = h:LoadAnimation(script.Parent:WaitForChild("Animation3"))
local tool = script.Parent
tool.Equipped:Connect(function()
anim:Play()
end)
tool.Unequipped:Connect(function()
anim:Stop()
end)

1 comment
and i forgot to add, this is the question i asked before, about how its working when i test it in studio, but it doesn't work in the public game on roblox.