Stop anim on tool destruction

Hello, im looking for support on a issue i have, the issue is where when you destroy a tool that has a animation playing it removes the tool but dosent stop the animation, is there a fix for this?

Maybe check if the tool is not existing anymore and if it isnt existing anymore just stop the animation

local tool = script.Tool
local animation = script.animation

if not tool then
      animation:Stop()
end

Thank you, i found a fix for it anyways.

2 Likes