Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a better way to script an idle animation with a tool than what i have below?

Asked by 4 years ago

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)

0
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. beargoespoopandpee 8 — 4y

Answer this question