game.Workspace.Values.Guns.Changed:connect(function(g)
if g == "Give" then
local Player = game:GetService("Players").LocalPlayer
local Item = game:GetService("ReplicatedStorage").Guns.Pistol:Clone()
Item.Parent = Player.Backpack
end
end)
I am trying to make something that gives a play a gun in their BackPack, but when they die they lose that item. Do I have to make something that detects if a player has died and if so restockthem with the item, or can I have something which even if the player dies, they keep the weapon?
I am not a noob to scripting, I have knowledge of it. I am not requesting any coding, just asking if it is possible, and maybe somethings I would need to add to the script.

4 comments
StarterGear meaning startPack?
No, it's a child of the player object. So like, 'Item:Clone().Parent = Player.StarterGear'.
I have editted the question with the code I am using now. It is in a LocalScript. How could I clone and parent the same item twice?
I edited my answer with it, hope I helped, np(: