Adding tools to player

When I reset 2 times a get a error.
Its says 15:45:50.934 - The Parent property of Handgun is locked, current parent: NULL, new parent Backpack

newPlayer:Connect(function(Player)
	local rank = Player:GetRankInGroup(7831617)
	local player = Player.name
	Player.CharacterAdded:Connect(function()
		if rank >= 16 then
			clonetools2.Parent = game.Players.thebeston123.Backpack
		end
	end)
end)
1 Like

It gives you that error because you’re trying to change the clonetools2.Parent but clonetools2 is already destroyed.

So how can I fix it? Do I need to destroy it?

The tools in your backpack gets destroyed everytime you die / reset.

What is clonetools2?

local clonetools2 = tool:Clone()

You should try this

newPlayer:Connect(function(Player)
	local rank = Player:GetRankInGroup(7831617)
	local player = Player.name
	Player.CharacterAdded:Connect(function()
		if rank >= 16 then
			tool:Clone().Parent = game.Players.thebeston123.Backpack
		end
	end)
end)