Yes a main game script is not working I didn't type much cause i was rushing through so first of all I only know print() so sorry if my code is bad stupid or missing 400 lines So here is the script
local status = game:GetService("StarterGui").Status
local text = status.Frame.TextLabel
local spawns = workspace.Map.Spawns:GetChildren()
local noplayers = game.Workspace.Players
local plrneeded = 2
local sword = game:GetService("ReplicatedStorage").Sword1
local sword2 = game:GetService("ReplicatedStorage").Sword2
game.Players.PlayerAdded:connect(function(plr)
noplayers.Value = noplayers.Value + 1
end)
function check()
if noplayers.Value >= plrneeded then
return true
else
return false
end
end
function intermission()
for i = 5,1,-1 do
text.Text = "Intermission:".. i
wait(1)
end
end
while true do
wait(5)
players = {}
for _, plr in pairs(game.Players:GetPlayers()) do
if plr and plr.Character then
local hum = plr.Character:WaitForChild("Humanoid")
if hum and hum.Health >= 0 then
table.insert(players,plr)
end
end
end
if #players >= 2 then
break
end
end
local fighter1 = players[math.random(1,#players)]
while true do
someplr = players[math.random(1,#players)]
if someplr~= fighter1 then
fighter2 = someplr
end
end
while true do
wait(5)
intermission()
wait(1)
text.Text = "Loading map"
wait(3)
text.Text = "Map loaded"
wait(1)
fighter1.CFrame = spawns[math.random(1,#spawns)].CFrame
fighter2.CFrame = spawns[math.random(1,#spawns)].CFrame
wait()
text.Text = "Round starts in 3 second(s) be prepared!"
wait(3)
sword.Parent = fighter1.Backpack
sword2.Parent = fighter2.Backpack
while fighter1.Character.Humanoid.Health > 0 and fighter2.Character.Humanoid.Health > 0 do
text.Text = "Round in progress"
end
if fighter1.Character.Humanoid.Health > 0 and fighter2.Character.Humanoid.Health == 0 then
text.Text = fighter1.Name .." has won!"
wait(2)
fighter1.Character.Head:Destroy()
fighter2.Character.Head:Destroy()
text.Text = "New round starting soon!"
elseif fighter2.Character.Humanoid.Health > 0 and fighter1.Character.Humanoid.Health == 0 then
text.Text = fighter2.Name.. " has won!"
wait(2)
fighter1.Character.Head:Destroy()
fighter2.Character.Head:Destroy()
end
wait(1)
end
Also again I repeat I only know print() and I suck at scripting sorry if the code is stupid bad or missing 400 lines of code

1 comment
What u only know "Print()"??