Why isn't this Map-chooser script working?
01 | maps = game.Lighting.Minigames:GetChildren() |
03 | h = Instance.new( "Hint" , game.Workspace) |
10 | if game.Players.NumPlayers > 1 then |
12 | h.Text = "Deciding what map to choose" |
15 | ranGame = math.random( 1 , #maps) |
17 | gameChosen = maps [ ranGame ] |
19 | h.Text = "Minigame chosen: " .. gameChosen.Name |
23 | gameChosenClone = gameChosen:Clone() |
25 | gameChosenClone.Parent = game.Workspace |
33 | h.Text = "Time left: " .. i |
39 | h.Text = "Game ended!" |
43 | gameChosenClone:Destroy() |
47 | h.Text = "There needs to be more than 1 player to start" |
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.