Something you can do is get yourself a clone of the sword:
1 | local SwordClone = game.ReplicatedStorage.Sword:Clone() |
and do something like
1 | local SwordClone = game.ReplicatedStorage.Sword:Clone() |
2 | for _,player in pairs (game.Players:GetPlayers()) do |
3 | SwordClone.Parent = player.Backpack |
But somethings wrong.. it will only give it to one player, thats cause we only have one copy of the sword, an easy solution around this is:
1 | for _,player in pairs (game.Players:GetPlayers()) do |
2 | local SwordClone = game.ReplicatedStorage.Sword:Clone() |
3 | SwordClone.Parent = player.Backpack |
this way we get one copy of the sword for every player we find and put it in their backpack.
I hope this helps!