Here is all I have so far:
local Animation = Instance.new("Animation") Animation.AnimationId = "http://www.roblox.com/asset?id=154647208" function PlayAnimation() --C0DE HERE PL0X end script.Parent.MouseButton1Down:connect(PlayAnimation)
How do I make the TextButton play the animation (and loop the animation) when it is clicked by a player? I have no clue how to work animations, and I really need help.
Thanks in advanced!
You need to load the animation to the humanoid then play it. Use this in a local script. If you want to learn more about animations then go to the link below.
http://wiki.roblox.com/index.php?title=Animations
Player = game.Players.LocalPlayer local Animation = Instance.new("Animation") Animation.AnimationId = "http://www.roblox.com/asset?id=154647208" function PlayAnimation() local animTrack = Player.Character.Humanoid:LoadAnimation(Animation) animTrack:Play() end script.Parent.MouseButton1Down:connect(PlayAnimation)