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

How do I fix error: expected assignment or a function call ?

Asked by 4 years ago
Edited 4 years ago
-- Define variables

local Replicated = game:GetService("ReplicatedStorage")

local ServerStorage = game:GetService("ServerStorage")

local MapsFolder = ServerStorage:WaitForChild("Maps")

local Status = ReplicatedStorage:WaitForChild("Status")

local GameLength = 500

local reward = 50

-- Game loop

while true do

end

    Status.Value = "Waiting for enough players" 

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

    Status.Value = "Intermission"

    wait(10)

local plrs:{}
workspace

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

0
Line 29 and 30 are the ones I am stuck on. Can someone please help? TheExtremeChocolate 11 — 4y
0
Maybe try an assignment operator fam, "=". Not only that, workspace is reserved keyword. There is no need for LuaU either. Your loop will hold the game code too xD, not only that, crash your studio Ziffixture 6913 — 4y
0
0_0 woah TheExtremeChocolate 11 — 4y
0
local plrs = {workspace}. Is this better? TheExtremeChocolate 11 — 4y

Answer this question