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.
local intermission = script.intermission local inround = script.inround local players = game.Players:GetPlayers() local label = game.StarterGui.gamegui.Frame.GameLabel intermissiontime = 30 roundtime = 150 while true do for i,v in pairs(game.Players:GetPlayers()) do v.TeamColor = BrickColor.new("White") v:LoadCharacter() Instance.new("ForceField", v.Character) end intermission.Value = true label.Text = "Intermission(30s)" wait(intermissiontime) intermission.Value = false label.Text = "Round In Progress(150s)" for i,v in pairs(game.Players:GetPlayers()()) do v.TeamColor = BrickColor.new("Maroon") v:LoadCharacter() end wait(roundtime) end
Line 4, change
local label = game:GetService("StarterGui").gamegui.Frame.GameLabel
to this:
local label = game:GetService("Players")LocalPlayer:WaitForChild”PlayerGui”