Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make an animation play when equipped?

Here is the script I attempted to make:

script.Parent.Equipped:Connect(function(Mouse)
	local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
	animation:Play()
end)

So when the tool is equipped the animation should play.

2 answers

game.Players.LocalPlayer only works in a localscript, make it an localscript

2 comments

0

It was already in a Local Script

0

then dont say its a script

you have to make 2 variables, what i mean is

local animation = script.parent
local animaiontrack = animation:LoadAnimation()

This discussion is preserved as it was. New answers, comments, and votes are closed.