Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can Someone Help Me Out? Expected identifier when parsing expression, got ')'

i dont really know what ive done wrong the code seems right can someone help me and out and tell me what i have to do here?

This is my 1st game im tryna make and i dont know how to code properly help me out plez and thankz

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorage:WaitForChild("Status")

local GameLength = 120

local reward = 25

-- Game Loop

while true do

Status.Value = "Waiting for enough players..."

repeat wait(1) until game.Players.NumPlayers >= 2

Status.Value = "Intermission"

wait(10)

local plrs = ()




for i, player in pairs(game.Players:GetPlayers())do
    if player then
	    table.insert(plrs,player) -- Add each player into plrs table
	end
end

wait(2)

1 answer

✓ Accepted answer

Tables are declared using curly brackets like this

local newtable = {}

You were also missing an end at the bottom

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorage:WaitForChild("Status")

local GameLength = 120

local reward = 25

-- Game Loop

while true do
    Status.Value = "Waiting for enough players..."

    repeat
        wait(1)
    until game.Players.NumPlayers >= 2

    Status.Value = "Intermission"

    wait(10)

    local plrs = {}

    for i, player in pairs(game.Players:GetPlayers()) do
        if player then
            table.insert(plrs, player) -- Add each player into plrs table
        end
    end

    wait(2)
end

1 comment

0

Thanks i havent tried it out but i appreciate the help

This discussion is preserved as it was. New answers, comments, and votes are closed.