-
So I wanted to make a system that loads levels every time they win. (I didn’t continue it because I am focusing on the bug)
-
But the issue is that it wont continue, it just says “Choosing map!”? Screenshots:
-
I tried looking in the developer forum, but its not there. If you know the solution of the problem, please help me.
local start = false
local function StartMatch()
game.ReplicatedStorage.Text:FireAllClients("Choosing Map!")
print("t")
wait(1)
local maps = game.ReplicatedStorage.Maps
local GetMaps = maps:GetChildren()
local random = math.random(1, #GetMaps)
local chosen = GetMaps[random]
if chosen then
for i = 10, 0 -1 do
game.ReplicatedStorage.Text:FireAllClients("Map Chosen: ".. chosen.Name.. "Starting in ".. i)
if i <= 0 then
local map = chosen:Clone()
map.Parent = workspace.ChosenMap
for number = 3, 0 -1 do
game.ReplicatedStorage.Text:FireAllClients(number)
if number <= 0 then
game.ReplicatedStorage.Text:FireAllClients("START!")
game.Workspace.Door.CanCollide = false
game.Workspace.Door.Transparency = 1
end
wait(1)
end
end
wait(1)
end
end
end
game.Players.PlayerAdded:Connect(function()
local players = game.Players:GetPlayers()
if #players >= 1 then
start = true
game.ReplicatedStorage.Text:FireAllClients("2 Players/Higher found! Starting...")
while wait(1) do
StartMatch()
end
else
game.ReplicatedStorage.Text:FireAllClients("2 Players/Higher needed to start.")
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.