I was trying to make a simple Roblox game with a tutorial from AlvinBlox and it keeps saying the following message: "ServerScriptService.MainScript:27: Expected identifier when parsing expression, got ')'" And when I try to fix it: "ServerScriptService.MainScript:82: Expected 'end' (to close 'do' at line 27), got "
I followed everything he said to do in the tutorial (https://www.youtube.com/watch?v=1MappXJ51Oo) so I can't figure out what I did wrong! If any of you can help me fix my game and not have to restart, I would greatly appreciate that.
P.S-I have already tried to rewrite the line, it won't work. EDIT: My main script is here (down to my issue, line 27):
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local MapsFolder = ServerStorage:WaitForChild("Maps")
local Status = ReplicatedStorage:WaitForChild("Status")
local GameLength = 300
while true do
Status.Value = "Waiting for enough players"
repeat wait() until game.Players.NumPlayers >=2
Status.Value = "Intermission"
wait(15)
local plrs = {}
for i, player in pairs (game.Players:GetPlayers()) do
if player then
table.insert(plrs,player)

10 comments
Can we get your version of the script?
I put my script down to line 27, where it located an issue.
Post your full script, or a longer one with more context.
Fix your formatting
Why is there asterisks?
This looks like you did not post your whole script. I would hope at least this is not your whole script.
Do not post code that does not belong to you, and only you. It is generally discouraged to do so on this website.
This has now been answered, but I would severely question either: the validity of a tutorial in which this kind of mistake isn't obvious to you by the end, as it very much should be; or why you're rushing through to get to a completed script, since you may as well just be using free models or something at that point.
Guys, I'm really confused. What the heck is an "end loop"?
it might just be an old video/script, and it got outdated from all of the roblox updates.