Idea The goal of this code is to re give a player a tool every time they un equip the tool.
Problem The problem is every time the player puts down the tool, I get an error.
Error the error give in Something unexpectedly tried to set the parent of Pistol to Player1 while trying to set the parent of Pistol. Current parent is Backpack.
CODE:
local tool = script.Parent.Parent.Backpack.Pistol local player = game.Players.LocalPlayer player.Character.Humanoid:EquipTool(tool) tool.CanBeDropped = false function equipAgain() player.Character.Humanoid:EquipTool(tool) end tool.Unequipped:connect(equipAgain)