How to Animate on Roblox

Local Script (put this inside the TextButton)

script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.RemoteEvent:FireServer(“00000000”) — Change 0000000 to your animation ID. KEEP THE SPEECH MARKS!
end)

–Server Script

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,animationID)
local animation = Instance.new(“Animation”)
animation.AnimationId = “http://www.roblox.com/Asset?ID=%22..animationID

local loadedAnimation = game.Workspace[player.Name].Humanoid:LoadAnimation(animation)
loadedAnimation:Play()
end)

Subscribe for more tutorials on Roblox scripting from me.