I am trying to permanently remove a tool from the player's backpack.
I've tried using:
tool:Destroy()
and
tool.Parent = workspace
However, when my players dies or resets, the tool comes back to the players backpack. How do I prevent this?
I am trying to permanently remove a tool from the player's backpack.
I've tried using:
tool:Destroy()
and
tool.Parent = workspace
However, when my players dies or resets, the tool comes back to the players backpack. How do I prevent this?
Is the tool in StarterPack? If so, all tools in StarterPack are cloned back into the player's backpack when they die/reset. To prevent this, I would move the tool to ServerStorage. After moving the tool, I would make a Script with the .PlayerAdded event. Then clone the tool and parent it to the player's Backpack.
Find the players backpack, find the tool from backpack, destroy it
local player = game:GetService("Players")
local lplayer = player.LocalPlayer
local backpack = lplayer.Backpack
if die then -- Die isn't real. this is just an example. create your own variable identifying 'die'
backpack.toolName:Destroy()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
No, it's not. There are other scripts in starter pack though. Does that mean anything?
Is it in StarterGear?
wtf is starter gear lol