I looked at so many tutorials but they only work for 'Printing' or 'Hint's'. Also, I tried to change the hint's to text, but it won't work.
I've tried many things to fix this problem but none of them are doing the trick, so I was wondering if someone could help. Thanks!
Errors: Text won't change. Map's won't load. It will not teleport you to the map.
Code:
local playerNotifications = game.StarterGui.ScreenGui.Frame.TextLabel
function waitForPlayers()
if game.Players.NumPlayers < 1 then
playerNotifications.Text = "Waiting for players!"
end
end
function intermissionTimer()
if game.Players.NumPlayers > 1 then
for countDown = 10, 1, -1 do
playerNotifications.Text = "Intermission: " ..countDown
end
end
function displayGamemode()
- Couldn't find code for this.
end
function mapSelection()
local mapList = game.ReplicatedStorage.Maps:GetChildren()
local randomMap = math.random(1, #mapList)
playerNotifications.Text = "Choosing the map!"
wait(4)
local mapChosen = mapList[randomMap]
playerNotifications.Text = "The map is: " ..mapChosen.Name
local mapClone = mapChosen:Clone()
mapClone.Parent = game.Workspace
end
function teleportAllPlayers()
local target = CFrame.new(mapClone.Spawns.Position)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
player.Playing.Value = 1
end
end
function startingTimer()
for countDown = 3, 1, -1 do
playerNotifications.Text = "Game begins in: " ..countDown
end
end
function roundTimer()
for countDown = 20, 1, -1 do
playerNotifications.Text = "Time left: " ..countDown
end
end
function roundEnded()
- Couldn't find code for this.
end
function teleportAlivePlayers()
local target = CFrame.new(workspace.TeleportTarget.Position)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
player.Playing.Value = 0
end
end
function mapDestroy()
- Couldn't find code for this.
end
function showResults()
- Couldn't find code for this.
end
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
player.Playing.Value = 0
end)
end)
local playing = Instance.new("IntValue", player)
playing.Value = 0
playing.Name = "Playing"
end)
while(true) do
waitForPlayers()
wait(0)
intermissionTimer()
wait(0)
displayGamemode()
wait(5)
mapSelection()
wait(5)
teleportAllPlayers()
wait(0)
startingTimer()
wait(0)
roundTimer()
wait(0)
roundEnded()
wait(0)
teleportAlivePlayers()
wait(0)
mapDestroy()
wait(0)
showResults()
end
end

2 comments
You have too many ends at the end. Move the end from 105 to line 12, since the script is thinking you're trying to end the function, not the loop all the way at line 11
You need 2 hyphens or it will error all the code below. https://gyazo.com/45afd362dc675514eccee844b46855b9