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