For i,v in pairs(game.Players:GetPlayers()) do doesn't work?
So, I am making a round game. So basically you wait in the lobby for 30 seconds and after that a round starts and your force field gets removed so you can fight, then after 150 seconds you get sent back to the lobby and it repeats. Everything seems fine but the for i,v argument. No errors or underlines. Can someone help? The script's below.
01 | local intermission = script.intermission |
02 | local inround = script.inround |
03 | local players = game.Players:GetPlayers() |
04 | local label = game.StarterGui.gamegui.Frame.GameLabel |
08 | for i,v in pairs (game.Players:GetPlayers()) do |
09 | v.TeamColor = BrickColor.new( "White" ) |
11 | Instance.new( "ForceField" , v.Character) |
13 | intermission.Value = true |
14 | label.Text = "Intermission(30s)" |
15 | wait(intermissiontime) |
16 | intermission.Value = false |
17 | label.Text = "Round In Progress(150s)" |
18 | for i,v in pairs (game.Players:GetPlayers()()) do |
19 | v.TeamColor = BrickColor.new( "Maroon" ) |