This is supposed to check the health of a humanoid until it is equal to zero, then it changes the player to a different team. The loop doesn't seem to be firing. Is there something I am doing wrong? Thank you! :)
local player = game.Players.LocalPlayer
local name = game.Players.LocalPlayer.Name
local gethumanoid = game.workspace.name.FindFirstChild("Humanoid")
repeat
print ("Player is healthy")
wait (1)
until gethumanoid.Health == 0
player.TeamColor = BrickColor.new("Dark stone grey")

3 comments
gethumanoid.Died:connect(function()
Personally would use Humanoid.Died:connect(function) unless you want to watch the steps of their health
It worked for me for the dummies that I had, I deleted the local functions and changed the code a bit. Just what I needed thanks!