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

Why dosen't my animation load to the character when i click on the part?

Im trying to play a anition when click on a part [ClicckDetector] but it dosen't work, any help??

code:

local click = script.Parent.ClickDetector

local Sew = script.Parent

local anim = script.Parent.Animation

-----------------------------------------

click.MouseClick:Connect(function(playerWhoClicked)

playerWhoClicked.Character.Humanoid:LoadAnimation(playerWhoClicked,3122381458)

en

1 answer

✓ Accepted answer

You need to play the animation using play()

local click = script.Parent.ClickDetector

local Sew = script.Parent

local anim = script.Parent.Animation

-----------------------------------------

click.MouseClick:Connect(function(playerWhoClicked)

Anim = playerWhoClicked.Character.Humanoid:LoadAnimation(playerWhoClicked,3122381458)
Anim:Play()

end

3 comments

0

My brain.... I'm soo stupid

0

loadanimation requires an animation object..?

0

nvm fixed it myself :)

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