Cloned tool breaks when i reset with or without it being equipped

So i made a gun clone from replicated storage to a players backpack when you hold E on a fake version(model) of the gun in the workspace, and it works perfectly at first. But if you reset without it equipped, the cloner (proximityprompt) returns this.

and after, it doesnt even let you grab a gun at all! it simply ignores the proximity prompt.

It actually gets less game breaking if you die with it equipped, but it ruins the motor6d’s and acts like theyre rigid constraints. it still works though, but this tells me that it could be a problem with a dead player’s gun’s properties being applied to the initial gun from replicated storage.
image

I would like to know if there is a fix to this that doesnt involve remaking the entire gun and giver, so if anybody has a fix or reason for this, let me know! thanks

Sounds like you have a Proximity Prompt inside the gun that the player puts in their backpack.

Not sure why. If you need to have it, then try something like:

if script.Parent.Name ~= "Backpack" then
 -- do something
end

Read the post. i said i have the proximityprompt inside a model of the gun.

I did. I just didn’t understand if you meant the Proximity Prompt is in the Workspace version of the gun or if the Proximity Prompt is in the CLONE of the gun that get’s put into the players backpack.

the players are supposed to pick their own weapons, not spawn with them

I thought you wanted to keep tools after death, idk why i read it like that lol my bad.

Can you show the part of the code where you are cloning the gun?