|
| 02 Apr 2017 08:13 AM |
I made a script but it doesn't work and I don't know why, at the end if it says "Expected identifier, got end", can someone help?
local function round() script.Mode.Value = "Preperation" local players = game.Players:GetChildren() for i,v in pairs(players) do game.Workspace[v.Name].Parent = game.ServerStorage end Map.Parent = game.Workspace local v = 25 repeat v = v - 1 wait(v/100) local Maps = game.Lighting.Maps:GetChildren() local Selection = ma#################### #Ma######## (Maps[Selection].Name) print(v) until v < 1 local map = game.Lighting[Map.Text]:clone() map.Parent = game.Workspace wait() local players = game.Players:GetChildren() for i,v in pairs(players) do game.ServerStorage[v.Name].Parent = game.Workspace end local People = game.Players:GetChildren() local Dead = math.random(1,#players) game.Workspace[players[Dead].Name].Humanoid.Health = 0 if #People >= 4 then repeat local Dead2 = math.random(1,#players) until Dead2 ~= Dead if #People >= 8 then repeat local Dead3 = math.random(1,#players) until Dead3 ~= Dead and Dead3 ~= Dead2 if #People >= 16 then repeat local Dead4 = math.random(1,#players) until Dead4 ~= Dead and Dead4 ~= Dead2 and Dead4 ~= Dead3 end if end if end if end |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2017 08:36 AM |
| You have three 'ifs' at the end of the code. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2017 08:42 AM |
| So what's the problem? I put an end to them all. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2017 08:43 AM |
if #People >= 16 then repeat local Dead4 = math.random(1,#players) until Dead4 ~= Dead and Dead4 ~= Dead2 and Dead4 ~= Dead3 end if --right here end if --right here end if -- and right here end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 02 Apr 2017 09:51 AM |
| Remove the "if"s next to the ends. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2017 09:52 AM |
| Oh I see. My bad, thanks for the help. |
|
|
| Report Abuse |
|
|