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

Tool Animation not Playing OnClick?

Asked by 6 years ago

So I set up to what I believe is right. This is the first time actually getting into tool animations so bear with me. But I am calling everything I believe, yet the animation is not playing. The script is local and is placed in the tool. Im not sure if the animation needs reviewed or what.

Tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil
local hum = player.Character:WaitForChild("Humanoid")

local animation1 = Tool.HammerSwing 
local AnimTrack = hum:LoadAnimation(animation1) 

Tool.Activated:connect(function(mouse)
        AnimTrack:Play()
 end)



Tool.Unequipped:connect(function()
    AnimTrack:Stop()
end)



If you have anything to help, Please lt me know!

0
Change Activated to Equipped @ TayLife12 JoeRaptor 72 — 6y
0
That didnt change a thing TayLife12 69 — 6y
0
Tool.Equipped function and then tool.activated function inside it. Also, put a characteradded:wait() variable instead of using a loop, char = player.CharacterAdded:wait() User#18043 95 — 6y

Answer this question