for i,v in pairs (_G.Playing)do -- Finds whos in the table
		local char = v.Character
		local human = char:WaitForChild('Humanoid') 
		if char and human then	 -- keeps looping this
			workspace.Values.Status.Value = 'The next gamemode is Classic!'
			wait(3)
			for i,chars in pairs (_G.Playing) do
			teleport.telePlayers(chars,workspace:WaitForChild'Spawn') -- Teleport to arena 
			end
			status.Value = 'Simple, everyone gets a basic sword and fights to be the last one alive! Get Ready!'
			wait(8)	
			status.Value = 'Giving every player their sword...'
					for i,back in pairs (_G.Playing) do
			giveWeapon.giveWeaponToPlayers(back,game:GetService('ReplicatedStorage').Tools.Sword)
					end
		end
		break
		end
		wait(3)
	end
	status.Value = 'Kill every player and be the last one standing to win!'
		for i = 100,0,-1 do
			wait(1) 
if #_G.Playing == 1 then -
for i,winner in pairs (_G.Playing) do
	if winner then --Finding the winner
		if winner ~= nil then
			status.Value = winner.Name..' is the winner of the round and has recieved 100 CREDZ!'
		award.awardPlayers(_G.Playing, 100)
		winner.Character.Humanoid.Health = 0
		_G.Playing = {} -- Reset Table
		wait(3)
		workspace.Values.Round.Value = false
		workspace.Values.Intermission.Value =true
		workspace.Values.Classic.Value = false	
		break	
		end
	else
		error('No Winner Found')
	end
end
end
end
if #_G.Playing >= 2 then -- When the timer [i] is upit finds to see if multiple players won the round
		award.awardPlayers(_G.Playing, 40) --goes into the table , rewards 40
	status.Value = 'Multiple people have won the round and have been awarded 40 CREDZ!'
			for i, v in pairs (_G.Playing) do
				v.Character:FindFirstChild('Humanoid').Health = 0 --resets character
			end
		_G.Playing = {} -- Reset Table
		wait(3)
		workspace.Values.Round.Value = false
		workspace.Values.Intermission.Value =true
		workspace.Values.Classic.Value = false	
	end
begin()

i tried to break it but then it just ruins the whole script... Ive looked it up but there were no results to this problem.. Any answers pleased, thanks!

3 comments

0

Problem starts at line 4

0

Can you fix the indentation?

0

nope