Does anybody know a script that can give a random player a tool,but the other players get nothing?
✓ ANSWER ACCEPTED
How do I give a random player a tool?
3 answers
✓ Accepted answer
local ItemToGive = game.Lighting.Sword
local player = math.random(1, game.Players.NumPlayers);
local Players = game.Players:GetPlayers()
ItemToGive:Clone().Parent = Players[player]
local ItemToGive = game.Lighting.Tool
local player.math.random(1, game.Players.numPlayers);
local Players = game.Players:Getplayers()
ItemToGive:Clone().Parent = Players [Player]
--give tools stuff to player and give tool
print("Tool given to random player!")
1 comment
0
Local Needs To be There.
local player = math.random(1, game.Players.NumPlayers);
for i,p in pairs(game.Players:GetPlayers()) do
if i==player then
--give tool stuff
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Ok,But where do I put the tool?
in the lighting... The tool has to be named sword unless you change the sword bit on line 1
Ok thanks :D!