SHOW:
|
|
- or go back to the newest paste.
1 | local animation = Instance.new("Animation") | |
2 | animation.AnimationId = "http://www.roblox.com/Asset?ID=01336707690" | |
3 | ||
4 | local trackanimation = nil | |
5 | local playability = true | |
6 | function playAnimation(AnimationSource) | |
7 | if playability == true then | |
8 | local plr = game.Players.LocalPlayer | |
9 | trackanimation = plr.Character.Humanoid:LoadAnimation(Animation) | |
10 | ||
11 | trackanimation.KeyframeReached.connect(function(kf) | |
12 | print('Working') | |
13 | end) | |
14 | trackanimation.Play() | |
15 | end | |
16 | end | |
17 | - | script.Parent.MouseButton1Down:connect(PlayAnimation) |
17 | + | script.Parent:connect(PlayAnimation) |