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

Why is my animation not playing when button is pressed?

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:

local emoteButton = script.Parent

local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local animation = humanoid:LoadAnimation(script.Animation)

emoteButton.MouseButton1Click:Connect(function()	
	animation:Play()
end)

1 answer

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