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

Having some weird problem with if statements not ending correctly?

Asked by 7 years ago

Not working for whatever reason, at the end of the script it says "Expected identifier, got 'end'", puts players into serverstorage, choses map, then selects random players to kill to become zombies.

local NE = Instance.new("Message") NE.Parent = game.Lighting NE.Name = "NotEnough" NE.Text = "You need at least two players to play!" local Map = Instance.new("Message") Map.Name = "MapSelection" Map.Text = "Current map" 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 = math.random(1,#Maps) Map.Text = (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

0
Can you format your code block by clicking the lua button and putting your code between the teo lines of ~s? starlebVerse 685 — 7y
0
What the , okay indent your code for one and 2 put them in lua block if ya want help.This is also quite large just get to the point farrizbb 465 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

I found what the problem was, thanks anyways.

Ad

Answer this question