Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sword giver script not working proporly?

Asked by 6 years ago

I made a sword giver script that give everybody in the server a sword, but when the function fires instead of everybody getting one sword it gives everyone gets a number of swords depending on how many players are in the server, so for example if there are 3 people in the server everybody gets 3 swords and if there are 15 people in the server everybody gets 15 swords.

This is the code I used:

swords = function()
    for _,player in ipairs(game.Players:getChildren()) do
 local tool = game.Lighting.sword:clone()
 tool.Parent = player.Backpack
    end
end
0
you tried to set a limit to the sword to each player? darkzerobits 92 — 6y

Answer this question