I'm trying to trigger my character to do the dance animation through via the code. How would I do this?
Here is the code I have for this so far:
if x <= 0 then script.Parent.Parent.Parent.Enabled = false workspace.Button:Destroy() --[[ Animation Part --]]
Thanks for helping!
Animations can be played through use of the LoadAnimation
method found in humanoids and AnimationControllers..
Here's an example on how to use 'em:
local Humanoid = script.Parent.Humanoid local Anim = game:GetService("ReplicatedStorage"):FindFirstChild("Anim") Humanoid:LoadAnimation(Anim):Play()
For more information on how to use/make these, look at this article: http://wiki.roblox.com/index.php?title=Animations