Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't this Map-chooser script working?

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.

1 comment

0

I didn't expect it to look so jumbled up. Sorry

1 answer

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

2 comments

0

Thanks. That was so simple.. I didn't even see it

0

Np, Happens to me to.

This discussion is preserved as it was. New answers, comments, and votes are closed.