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

Why wont this Tool giver script work?

wait(2)
	  sr = game.ReplicatedStorage["TOOL_Drive"].StarterRod:clone()
    for i = 1, #Players do 
        sr.Parent = Players[i].Backpack
	end

(Yes ive made TOOL_Drive inside ReplicatedStorage,Not an error) What that is soppost to do is basically clone the StarterRod,And place it into everyone's starterpack. But its not working for some reason. Can anyone debug?

2 comments

0

Is Players defined?

0

Yes, Players = game.Players:GetChildren()

1 answer

✓ Accepted answer

I suppose you've already defined Players. You're cloning the tool, but you're only doing it once, and not for each player. Try this.

wait(2)
for i = 1, #Players do
	local sr = game.ReplicatedStorage["TOOL_Drive"].StarterRod:Clone() --Clones the tool for the number of players there are.
	sr.Parent = Players[i].Backpack --Puts the clone in their backpack.
end

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