i am trying to make the game play an animation when the tool is equipped & clicked

player = game.Players.LocalPlayer
mouse = player:GetMouse()
script.Parent.Activated:Connect(function(mouse)

local Animation = script:WaitForChild("Animation")
local AnimationTrack = player.Character.Humanoid:LoadAnimation(Animation)

AnimationTrack:Play()
end)

6 comments

0

does the tool have a handle?

0

i do not use handles. this is a PUNCH script

0

oh thank you

0

He is wrong do not listen to him.

0

You should always be using a LocalScript in a tool. Also, if you use a LocalScript, you can use LocalPlayer in a tool.

0

Play animations on the client. If you aren't already.