I'm trying to make a script that gives tools for HRs in my group only. I have a script and a folder that holds my tools in one place.
game.Players.PlayerAdded:connect(function(player) if player:GetRankInGroup(1238286) >= 20 then for _,tool in pairs(script.tools:GetChildren()) do local tools = tool:Clone() tools = player.Backpack end end end)
Right now, I cannot get it to work. What am I doing wrong?
On line 5, you set tools
to player.Backpack
. I'm assuming you meant to set the tool's Parent:
game.Players.PlayerAdded:connect(function(player) if player:GetRankInGroup(1238286) >= 20 then for _,tool in pairs(script.tools:GetChildren()) do tool:Clone().Parent = player.Backpack end end end)
Hope this helped.