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

I have a error on a script in serverscriptservice that I need help fixing, how would I?

Asked by 4 years ago

I was writing a script for my game and I got an error, I'm not sure how I would fix it, as far as I can tell everything is right. Here's the script.

001local MapsFolder = ServerStorage:WaitForChild("Maps")
002 
003local Status = ReplicatedStorage:WaitForChild("Status")
004 
005local GameLength = 600
006 
007local reward = 1
008 
009while true do
010 
011 
012Status.Value = ("Waiting for enough players")
013 
014repeat wait(1) until game.Players.NumPlayers >= 2
015 
View all 117 lines...

The error is on line 101 with the if, it is underlined and the error says "Expected identifier when parsing expression, got if". Thanks for any help.

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

On line 99 you are trying to concatenate an if statement with a string. You cannot concatenate a string with an if statement. To fix this, simply just remove the .. at the end of line 99.

0
thanks! SheepeySheeps 4 — 4y
0
np! Brandon1881 721 — 4y
Ad

Answer this question