local p = game.Players:GetChildren()

local players = game.Players.NumPlayers

local Counter = Instance.new("IntValue", workspace)

Counter.Name = "PlayerCount"

local Spawns = game.Workspace.Spawns.Eliminating:FindFirstChild("Model"):GetChildren()

wait(3)

Round = true
teleport = Instance.new("IntValue", workspace)
teleport.Value = 0

local replicatedstorage = game:GetService('ReplicatedStorage')

local status = replicatedstorage:WaitForChild('InfoValue')

local mapstorage = game.workspace:WaitForChild('mapStorage')

while game.Players.NumPlayers < 2 do
	status.Value = 'There needs to be 2 or more players to begin'
	repeat wait() until game.Players.NumPlayers >= 2
end	

while true do
	if Round == true then
	wait(3)
	Counter.Value = #game.Teams.Eliminating:GetPlayers()
	if Counter.Value < 1 or Counter.Value == 1 then
		for _, player in pairs(game.Teams.Eliminating:GetPlayers()) do
			player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1
			player.leaderstats.Money.Value = player.leaderstats.Money.Value + 5
		end
		print('All players died')
		game.Workspace.Ground:Destroy()
		print('Ground destroyed')
		Round = true
		for i = 5,0, -1 do
	status.Value = 'Intermission '..i
	wait(1)
		end
		status.Value = 'May The Best Man Win!!'
		wait(2)
		status.Value = 'Good luck'	
		game.Lighting.Ground:Clone().Parent = game.Workspace
		print('Ground regenerated')
			local players = game.Players:GetPlayers()
				for _, player in pairs(game.Players:GetPlayers()) do
					if player.Ready.Value == 1 then
						player:FindFirstChild("InGame").Value = 1
    				player.Team = game.Teams.Eliminating
					print('All changed to eliminating')
					teleport.Value = 1
					local players = game.Players:GetPlayers()
				if teleport.Value == 1 then
					for _, player in pairs(game.Players:GetPlayers()) do
						print("Looping the characters")
						player.Character:MoveTo(Spawns[math.random(1, #Spawns)].Position)
						player.Character.Torso.Anchored = false
						player.Character.Humanoid.PlatformStand = false
						teleport.Value = 0
						p.PlayerGui.Obby.Tp.Visible = false
						p.PlayerGui.Class.Classes.Visible = false
						end
					end
				end
			end 
		end
	end
end

Here is the script:

So basically the Gui gets stuck on "Good luck" And the game only tps one player. And in the end it does not send an error. If you can please show me what is the error and explain what I did wrong it would be very nice

1 comment

0

Deleting your old question and reposting it, ESPECIALLY if 24 hours didn't pass, still violates reposting. Only warning you'll get.