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

Why isn't this Map-chooser script working?

Asked by
Scerzy 85
10 years ago
maps = game.Lighting.Minigames:GetChildren()

h = Instance.new("Hint", game.Workspace)



while true do


if game.Players.NumPlayers > 1 then

h.Text = "Deciding what map to choose"

wait(4)
 ranGame = math.random(1, #maps)

gameChosen = maps [ranGame]

 h.Text = "Minigame chosen: " .. gameChosen.Name

 wait(3)

 gameChosenClone = gameChosen:Clone()

 gameChosenClone.Parent = game.Workspace



 --Countdown until the game ends

 for i = 40, 1, -1 do

 h.Text = "Time left: " .. i

 wait(1)

 end

 h.Text = "Game ended!"

 wait(10)

 gameChosenClone:Destroy()

else

 h.Text = "There needs to be more than 1 player to start"

end

wait(1)

 end?

I've placed 3 maps in a model in the Lighting folder. This should select them at random. No "hints appear at the top of my screen when playing. Nothing happens. Why is that? I know I didn't add a teleporter. I'll do that later.

0
I didn't expect it to look so jumbled up. Sorry Scerzy 85 — 10y

1 answer

Log in to vote
0
Answered by
SimIcy 5
10 years ago

Look at last end it has a ? mark by it on line 53

0
Thanks. That was so simple.. I didn't even see it Scerzy 85 — 10y
0
Np, Happens to me to. SimIcy 5 — 10y
Ad

Answer this question