This script was placed inside of the gun, and when I try to run it this error appears: 12:07:19.710 - Something unexpectedly tried to set the parent of Assault Rifle [30] to Player while trying to set the parent of Assault Rifle [30]. Current parent is Backpack. Any Ideas? Here is the full code:
local tool = script.Parent-- Tool
local player = script.Parent.Parent -- Player
player.Character.Humanoid:EquipTool(tool)
tool.CanBeDropped = false
function equipAgain()
player.Character.Humanoid:EquipTool(tool)
end
tool.Unequipped:connect(equipAgain)

5 comments
I dont get the error, but it allows me to put away the tool, any ideas
I changed it, now it should equip a tool if parent changed to "Backpack"
Awesome Thanks!
If it helped you, please accept the answer ;)
It all of the suddent stopped working?