Server not killing players

Basically Im making a round based game like the game color block, and when the round ends all players still on the playing team (Basically players that are still alive) are killed, given points, and a win and the round resets.

I have already used print statements and found out that the script to kill the players is triggering but its not killing all the players, and I’m getting no error messages

anyways here’s a screenshot If anyone can tell me why it wont work.

image

Setting the character’s MaxHealth to 0 doesn’t kill the player. You should set Health to 0 instead.

v.Character.Humanoid.Health = 0

checked, the provided script does not kill the players, I tried to make a quick solution but I need more explanation, for example how the Boolean “match” works, why a Hearbeat is needed to check the status of “i” inside a loop that gets all the players (I understand the player loop is for some time menu or something like that)

while Match == true do
		for i = 10, 0, -1 do
			print(i)
			if i == 0 then
				print("RoundOver")
				Match = false
				for i, v in pairs(SomeTeam:GetPlayers()) do -- Change for the winners table
					v.Character:FindFirstChildWhichIsA("Humanoid").Health = 0
				end
			end
		end
		task.wait(1)
		print("Loop")
	end 

I do not need any help anymore. As it was a simple fix with me having to change the MaxHealth to Health.

Sorry if the code was confusing but to explain it simply, the code I showed is part of putting players on a playing team and then handling a round and ending it once the round is over. Also some of it is unfinished and does not work properly but I just needed help with the health thing as I know the fix for the rest.