Flashlight breaks when resetting

So I found this one flashlight model in the toolbox, but for some reason if you reset while holding the flashlight and then equip it again after respawning, all the welds or like all the other parts other than the Handle just appear somewhere else like the welds would have gotten deleted.
Flashlight.rbxm (33.2 KB)

Could I get a video of this happening? I can’t seem to recreate the problem you are having in studio. I have inserted the tool that you provided into the starter pack and emulated what you have done for this problem to occur accurately.

The walking animation while holding the flashlight is intentional btw

I am not sure why it does this

That is strange for the flashlight to do that. Is there any other scripts that are doing things to the flashlight? Only thing I could think of that might be causing this.

i dont deal with physical flashlight tools (cuz it makes the game feel basic for me)
but the best idea i can come up with is deleting the flashlight when the character dies, and respawning it with a separate script
like in a server script in ServerScriptService (i have zero clue if this code will work as i think it will cuz i didnt test this)

local light = PATH TO LIGHT HERE!!
local backupLight = light:Clone()
backupLight.Parent = nil
local char
light.Equipped:Connect(function()
char = light.Parent
char.Humanoid.Died:Connect(Function()
light:Destroy()
backupLight.Parent = workspace
light =backupLight
backupLight = light:Clone()
backupLight.Parent = nil
end)
end)

Looks like I fixed it. It was because I had a “keep inventory” script and it was broken so I removed it and now it works.