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