Im trying to prevent animations from playing once the tool has been put away. It’s an annoying glitch. I’ve tried using .IsPlaying to detect if the animation track is being used. Not sure what I’m doing wrong.
tool.Unequipped:Connect(function()
mouse.Icon = 'rbxasset://SystemCursors/Arrow'
caninteract = false
game.ReplicatedStorage.ScotEvents.ConnectM6D:FireServer(tool.BodyAttach)
Equip:Stop()
Idle:Stop()
canfire = false
aimed = false
if Equip.IsPlaying then
Equip:Stop()
end
if Idle.IsPlaying then
Idle:Stop()
end
if Reload.IsPlaying then
Reload:Stop()
end
if Aim.IsPlaying then
Aim:Stop()
end
if AimIdle.IsPlaying then
AimIdle:Stop()
end
if Bolt.IsPlaying then
Bolt:Stop()
end
if Fire.IsPlaying then
Fire:Stop()
end
end)