So I want to stop a loop from an if statement (BTW this is a boss battle script) Plus I tried Break but scene it's in a function it didn't work
while heathgood do
script.Parent.ParentHumanoid.HealthChanged:connect(function()
if script.Parent.Parent.Humanoid.Health < 50 debounce then
heathgood = false
--Do stuff
end
end)
--Do stuff
end

2 comments
Again I did this the loop stops but the first part just keeps on going
Without more information, I can't help you. Show your code.