The animation script is a local script inside of the main script for the tool. Here is the code..

player = game.Players.LocalPlayer
tool = script.Parent.Parent
humanoid = player.Character:WaitForChild("Humanoid")
SA = tool.Shield
PlayAnim1 = humanoid:LoadAnimation(SA)
	
function shieldup()

	PlayAnim1:Play()
	wait(2.5)
	PlayAnim1:Stop()
end

tool.Activated:connect(shieldup)

1 comment

0

What was the error message?