Text changing help?
I made a previous post about my round system, and someone helped me with it and they changed something about my Text Changer. The problem is whenever I try to start up a server in studio the text says "Label" and it never changes. Could anyone resolve this problem, thanks!
Also, if you see any bugs or errors in my round system, please feel free to point it out with how to change it, thanks!
Text Changer:
1 | function playerNotification(changeText) |
2 | for _,v in pairs (game.Players:GetChildren()) do |
3 | local ScreenGUI = v.PlayerGui:FindFirstChild( "ScreenGui" ) |
5 | ScreenGUI.Frame.TextLabel.Text = changeText |
Rest of the Round System:
001 | function playerNotification(changeText) |
002 | for _,v in pairs (game.Players:GetChildren()) do |
003 | local ScreenGUI = v.PlayerGui:FindFirstChild( "ScreenGui" ) |
005 | ScreenGUI.Frame.TextLabel.Text = changeText |
010 | function waitForPlayers() |
011 | while game.Players.NumPlayers < 2 do |
012 | playerNotification( "You need 1 more player to start the round!" ) |
017 | function intermissionTimer() |
018 | if game.Players.NumPlayers > = 2 then |
019 | for countDown = 10 , 0 , - 1 do |
020 | playerNotification( "Intermission: " ..countDown) |
026 | function displayGamemode() |
030 | function mapSelection() |
031 | local mapList = game.ReplicatedStorage.Maps:GetChildren() |
032 | local randomMap = math.random( 1 , #mapList) |
033 | playerNotification( "Choosing the map!" ) |
035 | local mapChosen = mapList [ randomMap ] |
036 | playerNotification( "The map is: " ..mapChosen.Name) |
037 | local mapClone = mapChosen:Clone() |
038 | mapClone.Parent = game.Workspace |
041 | function teleportAllPlayers() |
042 | local mapSpawn = CFrame.new(workspace.TeleportTarget.Position) |
043 | for i, player in ipairs (game.Players:GetChildren()) do |
044 | player.Character.Torso.CFrame = mapSpawn + Vector 3. new( 0 , i * 5 , 0 ) |
045 | player.Playing.Value = 1 |
050 | for countDown = 3 , 0 , - 1 do |
051 | playerNotification( "Game begins in: " ..countDown) |
057 | for countDown = 20 , 0 , - 1 do |
058 | playerNotification( "Time left: " ..countDown) |
064 | playerNotification( "The round has ended!" ) |
067 | function teleportAlivePlayers() |
068 | local mapSpawn = CFrame.new(workspace.SpawnLocation.Position) |
069 | for i, player in ipairs (game.Players:GetChildren()) do |
070 | player.Character.Torso.CFrame = mapSpawn + Vector 3. new( 0 , i * 5 , 0 ) |
071 | player.Playing.Value = 1 |
079 | function showResults() |
083 | game:GetService( 'Players' ).PlayerAdded:connect( function (Player) |
084 | Player.CharacterAdded:connect( function (Character) |
085 | Character:FindFirstChild( "Humanoid" ).Died:connect( function () |
086 | Player.Playing.Value = 0 |
090 | local Playing = Instance.new( "IntValue" , Player) |
092 | Playing.Name = "Playing" |
112 | teleportAlivePlayers() |