This script is a countdown for when a round begins. At the end of the countdown, it is supposed to give all the players teamed 'Fighters' a sword. However, it only gives it to one player, any ideas why?
wait(5)
sword = game.ServerStorage.Sword:Clone()
for i = 10,0,-1 do
wait(1.2)
local text = "Good luck! The round is starting in: " ..i
game.ReplicatedStorage.cd:FireAllClients(text, i)
print(i .. "XDXDXD")
if i == 0 then
game.Workspace.songg.SoundId = "http://www.roblox.com/asset/?id=1842263532"
game.Workspace.songg:Play()
for i,v in pairs(game.Teams.Fighters:GetPlayers()) do
sword.Parent = v.Backpack
end
game.ServerScriptService.gamecd.Disabled = false
lol = true
game.ReplicatedStorage.roundd.Value = game.ReplicatedStorage.roundd.Value + 1
script.Parent.round.Disabled = true
script.Disabled = true
end
end
This is the part of the script that does the giving:
for i,v in pairs(game.Teams.Fighters:GetPlayers()) do
sword.Parent = v.Backpack
end
