This script does work, but sometimes it doesn't at all. Every time I respawn or someone respawns, they have a high chance of not receiving the tool.
1 | game.Players.PlayerAdded:connect( function (p) |
2 | p.CharacterAdded:connect( function (c) |
3 | repeat |
4 | wait() |
5 | until p:FindFirstChild( "Backpack" ) |
6 | game.ServerStorage:GetChildren() [ math.random( 1 , #game.ServerStorage:GetChildren()) ] :clone().Parent = p.Backpack |
7 | end ) |
8 | wait( 2 ) |
9 | end ) |
Try This, make sure to put all your tools in Server Storage:
01 | --randomizer, place items in serverstorage |
02 |
03 | players = game.Players:GetChildren() |
04 | items = game.ServerStorage:GetChildren() |
05 |
06 | while wait( 120 ) do -- Every 2 Minutesit will clone a random tool, and give it to the players |
07 | if #players > 1 then |
08 | for i = 1 ,#players do |
09 | clone = items [ math.random( 1 ,#items) ] :Clone() |
10 | clone.Parent = players [ i ] |
11 | end |
12 | end |
13 | end |