I basically want whats circled to run at the same time instead of waiting 45 seconds before running the repeat without doing separate scripts. is it even possible?
local currentround = true
local aliveprey = true
local Lobby = game.Workspace.LobbySpawn
local function current()
wait(45)
currentround = false
end
current()
repeat
wait(1)
local players = game.Teams.Prey:GetPlayers()
if #players <= 0 then
aliveprey = false
end
wait(1)
if currentround == false then
for i,v in ipairs(game.Players:GetChildren()) do
print(v.Name)
repeat
wait(1)
until v and v.character
v.character:WaitForChild("HumanoidRootPart").Position = Lobby.Position
v.Team = game.Teams.Lobby
v.PlayerGui.Top.TextLabel.Text = "Predator Has Failed"
end
script.Disabled = true
end
wait(1)
if aliveprey == false then
for i,v in ipairs(game.Players:GetChildren()) do
print(v.Name)
repeat
wait(1)
until v and v.character
v.character:WaitForChild("HumanoidRootPart").Position = Lobby.Position
v.Team = game.Teams.Lobby
v.PlayerGui.Top.TextLabel.Text = "Predator Has Caught their prey"
end
script.Disabled = true
end
until aliveprey == false