Problem #1: Notifications
StarterGui
is basically where the guis get cloned from, it doesn't change everyone's guis.
So, instead, you make a function, right at the start that you call whenever you want to change text:
01 | function notification(text) |
02 | for _,v in pairs (game.Players:GetChildren()) |
03 | local find = v.PlayerGui:FindFirstChild( "ScreenGui" ) |
05 | find.Frame.TextLabel.Text = text |
Problem #2: Map
It should work, I see no problems. It is most likely something before the map function has errored.
Problem #3: Teleporting
The problem is that MapChosen
is a local inside the MapSelection
function, which means it doesn't exist inside TeleportPlayers()
.
To fix this, I would recommend you just create a local right at the start of the script, on Line 2 or something, called "CurrentMap". When it chooses the map, it sets CurrentMap
to MapChosen
, so inside the MapSelection
function:
This will mean you can get the current map in the entire script.
Also, here are some things to fix:
1. Make WaitForPlayers()
a while loop, so:
1 | function WaitForPlayers() |
2 | while game.Players.NumPlayers < 2 do |
3 | notification( "You need 1 more player to start the game." ) |
2.IntermissionTime()
needs an end
under the for loop.
Hope I helped :)