Hello! I’m trying to remove tools from a player when they exit a level.
The problem is, that I realized that when you equip a tool it goes into your character, not your backpack. So I made it loop through all the tools in both backpack and the player’s character, but for some reason, if I try and remove it from the character using “:Destroy()”, it deletes the character.
local function exitMap(player)
print(player.Name.." has exited the map.")
for _, tool in pairs(player.Backpack:GetChildren()) do
tool:Destroy()
end
for _, tool in pairs(player.Character:GetChildren()) do
tool:Destroy()
end
end