local ShieldAnimation = Instance.new("Animation") -- creates animation
ShieldAnimation.AnimationId = "rbxassetid://11846418852" -- sets the animation id
local animationTrack = animator:LoadAnimation(ShieldAnimation) -- loads the animation
if tool == 'Shield' then
if play then
print('played')
animationTrack:Play()
else
print('ended')
animationTrack:Stop()
end
end
end)
Server script inside a tool. Both print statements print, however animation doesn’t stop.