So im trying to give ALL the players in this :
--[iLegimate]-- -- NotesToDo -- -- Make fishing rods,Follow giveTools function -- --[Shortcuts]-- Players = game.Players:GetChildren() --[Functions]-- function giveTools() sr = game.ReplicatedStorage["TOOL_Drive"].StarterRod:clone() sr.Parent = Players.Backpack end wait(5) giveTools()
But its not working? Help out?
--[iLegimate]-- -- NotesToDo -- -- Make fishing rods,Follow giveTools function -- --[Shortcuts] Players = game.Players:GetChildren() -- Putting dashes around your Shortcuts comment screwed this part up. Try not to put double dashes after every comment as it will turn your script into comments. --[Functions]-- function giveTools() sr = game.ReplicatedStorage["TOOL_Drive"].StarterRod:clone() for i = 1, #Players do -- Gives sr to every single player. sr.Parent = Players[i].Backpack end end wait(5) giveTools()
So the script gets all the players, and the for loop gives it to every player, since giving the tool to Players.Backpack would not work. If you have any problems, just comment.