Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local animation = Instance.new("Animation")
- animation.AnimationId = "https://www.roblox.com/Asset?ID=1336877803"
- local trackanimation = nil
- local playability = true
- function playAnimation(AnimationSoure)
- if playability == true then
- local plr = game.Players.LocalPlayer
- trackanimation = plr.Character.Humanoid:LoadAnimation(animation)
- trackanimation.KeyframeReached:connect(function()
- print('Working')
- end)
- trackanimation:Play()
- end
- end
- script.Parent.MouseButton1Click:connect(playAnimation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement