I'm trying to make an animation button, where once you press the button an animation will play, but i dont know why my script isn't working. This is what I have so far:
01 | local emoteButton = script.Parent |
02 |
03 | local player = game.Players.LocalPlayer |
04 | local character = player.Character |
05 | local humanoid = character:WaitForChild( "Humanoid" ) |
06 |
07 | local animation = humanoid:LoadAnimation(script.Animation) |
08 |
09 | emoteButton.MouseButton 1 Click:Connect( function () |
10 | animation:Play() |
11 | end ) |
Just Watch This :D https://www.youtube.com/watch?v=p0Me0OmT1hQ