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

Nothing is wrong with the output I need help can someone fix?[UNANSWERED]

Asked by
Irvene 5
9 years ago

Nothing is in output, literally it shows nothing... I need help, what's wrong with this script please!!





--I edited as best I could, but I could not understand most of the coding/what you were trying to do, so I edited what I thought you were trying to do repeat wait(0)until game:FindFirstChild("Teams") local NumPlayers = 2 --Change this to the number of players needed local A = game.Players local A1 = "This service is unavailable, please wait until 1 more player joins..." local A2 = "Welcome to the official meadows sfing game" local A4 = "5" local A3 = "The amount of players is successful, and the game will be starting in" .. A4 .. "Seconds.." local A5 = "Teaming players..." local A6 = "Blue team has won" local A7 = "Red team has won" local BlueTeam = game.Teams:WaitForChild("BlueTeam") local RedTeam = game.Teams:WaitForChild("BlueTeam") local redplayers = 0 local blueplayers = 0 local M = Instance.new("Message") local TimeForLoop = .5 --This will loop the script every .5 seconds local players = 0 local GameRun = false function fixTeams() BlueTeam:Clone().Parent = game.Teams -- Whats 'clones[1]'? RedTeam:Clone().Parent = game.Teams -- Whats 'clones[2]'? end function checkSpectators() spectators = 0 for _, player in pairs(game.Players:GetChildren()) do if player.TeamColor == game.Teams.Spectators.TeamColor then spectators = spectators + 1 if(spectators >= NumPlayers) then BlueTeam:Destroy() RedTeam:Destroy() wait(3) end end end end function findwinner() for _, player in pairs(game.Players:GetPlayers()) do if player.TeamColor == BlueTeam.TeamColor then players = blueplayers + 1 wait(5) if blueplayers == 0 then print("Blue team has lost") M.Text = A7 elseif player.TeamColor == RedTeam.TeamColor then players = redplayers + 1 if redplayers == 0 then print("Red team has lost") M.Text = A6 end end end end end function StartGame() if GameRun then fixteams() checkspectators() findwinner() end end while wait(TimeForLoop)do if A.NumPlayers >= NumPlayers then GameRun = true StartGame() else GameRun = false print("There's not enough players in the game for the game to start.") repeat wait(0)until A.NumPlayers >= NumPlayers end end
0
Oops, that was embarressing, sorry chores Irvene 5 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

You can't use numbers as variables

0
How not? Irvene 5 — 9y
0
Varaibles can't start with numbers. Like 4A, A1 is perfectly fine. Gamenew09 180 — 9y
Ad

Answer this question