I've been trying to figure out hoe to delete a weapon permanently. I successfully deleted it from Backpack and Starter Gear, but when I respawn, for some reason the tool appears back into the backpack. Is there a reason for this?
If it helps this is my code that deletes the tool from starter gear and the character at the click of a button:
local function onCreatePartFired(player, tool)
local SG = player.StarterGear
if tool then
local sg_tool = SG:FindFirstChild(tool.Name)
if sg_tool then
print("hey")
sg_tool:Destroy()
end
tool:Destroy()
end
end
local Players = game:GetService("Players")
plr = game:GetService("Players").LocalPlayer
char = plr.Character or plr.CharacterAdded:Wait()
script.Parent.MouseButton1Click:Connect(function()
local tool = char:FindFirstChildOfClass("Tool")
onCreatePartFired(plr,tool)
end)
