After many attempts I finally found a script that works in studio, but not in game? This is the script -
local animation=Instance.new("Animation") animation.AnimationId="http://www.roblox.com/Asset?ID=2208574099" 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() print("Working") end) trackanimation:Play() end end script.Parent.MouseButton1Click:connect(playAnimation)````