Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Tool can't be cloned at the same time for 2 different people?

I made a clone script for a tool except when 1 player equips it, the other player who already has it equipped loses it? Here is my script:

Local script

local item = script.Parent
local tool = game.ReplicatedStorage.WoodenSword
local clonedTool = tool:Clone()

item.MouseButton1Click:connect(function()
	game.ReplicatedStorage.WoodenSwordRE:FireServer()
	
	
	
end)


Server Script

local tool = game.ReplicatedStorage.WoodenSword
local clonedTool = tool:Clone()

game.ReplicatedStorage.WoodenSwordRE.OnServerEvent:Connect(function(Player)
	
	clonedTool.Parent = Player.Backpack
end)



	

I also have a remote event called WoodenSwordRE

Can anyone help? Thanks!

1 answer

✓ Accepted answer

You need to clone a new Tool every time the Event is called, else you're just moving around the original clone to different Parents.

local tool = game.ReplicatedStorage:WaitForChild("WoodenSword")

game.ReplicatedStorage:WaitForChild("WoodenSwordRE").OnServerEvent:Connect(function(Player)
	tool:Clone().Parent = Player.Backpack
end)



This discussion is preserved as it was. New answers, comments, and votes are closed.