while true do -- Intermission for i = 30,0,-1 do status.Value = "Intermission: "..i wait (1) end local map = game.ServerStorage.GlassMap map:Clone().Parent = game.Workspace wait (15) game.Workspace.GlassMap:Destroy status.Value = "Game End" end
the code status.Value = "Game End" the status is highlighted red in it any reason why?
Methods/functions are always invoked using parenthesis, even if you're not putting anything in the parenthesis:
game.Workspace.GlassMap:Destroy() -- line 10
It expected to see an argument (something inside parenthesis) but instead saw the word status
.
You should use workspace
instead of game.Workspace
.
On line 10, you should use map
instead of saying workspace.GlassMap
-- since that's what you mean.
You should tab and space your code properly. Increase the indent one level in each "block" (inside a while
, for
, if
, function
, etc.
This shows how statements are "grouped" together, and makes it much easier to edit code.
I also suggest using the standard spacing for functions and operators: put spaces around operators like ..
, don't put spaces before the ()
in a function, and put spaces after a comma:
while true do -- Intermission for i = 30, 0, -1 do status.Value = "Intermission: " .. i wait(1) end local map = game.ServerStorage.GlassMap:Clone() map.Parent = workspace wait(15) map:Destroy() status.Value = "Game End" end