So i have a gui called "Time" and a script for a minigame... When a player enters the game the "Time" gui will run to count the time when a map will be choose its just simple script.. but when i enter to my game to try it .. it gives me this error
Workspace.Minigame script:58'end' expected (to close 'while' at line 4) near '<eof>' Workspace.Minigame script:266'end' expected (to close 'while' at line 4) near '<eof>'
--Follow the Instructions Below-- while true do --This makes sure it keeps going and doesn't die out on us wait(5) --This is how long until the games are started. Recomended that you keep to 5 local m = math.random(1,1) --This randomly selects a game. The seven shows how many games there are local player = game.Players:GetPlayers() for i = 1, #player do --This checks for players and gets them msg = Instance.new("Message") --This make the annoying messages that appear on you screen msg.Parent = nil --This identifies the game if m == 1 then --don't change unless you know what you are doing text = game.StarterGui.Time.Frame.Main while true do text.Text = "Waiting for next round..." text.FontSize = "Size24" wait(15) text.Text = "5..." text.FontSize = "Size36" wait(1) text.Text = "4..." wait(1) text.Text = "3..." wait(1) text.Text = "2..." wait(1) text.Text = "1..." wait(1) text.Text = "Begin!" wait(1) player[i].Character:MoveTo(Vector3.new(-37,4.2, -479)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame game.Lighting.Minigame1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish. text = game.StarterGui.Time.Frame.Main text.Text = "Minigame1" wait(10) --How long the game lasts msg.Parent = game.Workspace msg.Text = "Winner(s)!" --After the game ends, this shows a message/messages at the end. Edit if you want. wait(3) msg:remove() game.Workspace.Minigame1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored) end