Give Owner Tool Script Not Working

I have a script that is supposed to give a tool to owner but it just prints that the owner is the owner but never gives the owner the actual tools

local Pass = "Miserable_Haven"

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(hit)
		player:WaitForChild("Backpack")
		if player.Name == Pass then
			local cln = game.ServerStorage:WaitForChild("Throttle"):Clone(player.Backpack)
			if player.Backpack:FindFirstChild(cln) then
				print(player.Name.." has been given "..cln.Name)
			end
			local cln = game.ServerStorage:WaitForChild("DisableController"):Clone(player.Backpack)
			if player.Backpack:FindFirstChild(cln) then
				print(player.Name.." has been given "..cln.Name)
			end
			print(player.Name.." is "..Pass)
		else
			print(player.Name.." is not "..Pass)
		end
	end)
end)

These three scripts are in both tools
image
These are the properties of the tools


Output
image

Just try manually setting the clones parent to the Player’s backpack.

Clone.Parent = the-backpack!!

The method “Instance:Clone()” doesn’t have any parameters

1 Like

i tried this before and it didnt work but now I try it again it somehow works

new code :

local Pass = "Miserable_Haven"

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(hit)
		player:WaitForChild("Backpack")
		if player.Name == Pass then
			local cln = game.ServerStorage:WaitForChild("Throttle"):Clone()
			cln.Parent = player.Backpack
			if player.Backpack:FindFirstChild(cln) then
				print(player.Name.." has been given "..cln.Name)
			end
			local cln = game.ServerStorage:WaitForChild("DisableController"):Clone()
			cln.Parent = player.Backpack
			if player.Backpack:FindFirstChild(cln) then
				print(player.Name.." has been given "..cln.Name)
			end
			print(player.Name.." is "..Pass)
		else
			print(player.Name.." is not "..Pass)
		end
	end)
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.