Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Button = script.Parent:WaitForChild("TextButton")
- local Anims = script.Parent:WaitForChild("Anims"):GetChildren()
- local Plr = game.Players.LocalPlayer
- local Char = Plr.Character or Plr.CharacterAdded:Wait()
- local Animator = Char:WaitForChild("Humanoid").Animator
- Button.MouseButton1Click:Connect(function()
- local RanAnim = Anims[math.random(1,#Anims)]
- Animator:LoadAnimation(RanAnim):Play()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement