All it should do is when ur health's lower than 21 make the screen flash when it's above 21 stop the flashing
Now it doesnt work ? why
local humanoid = game.Players.LocalPlayer.Character.Humanoid
local currentHealth = humanoid.Health
local Flash = script.Parent.Flash
humanoid.HealthChanged:connect(function(health)
if humanoid.Health <= 21 then
local change = math.abs(currentHealth - health)
Flash.Visible = true
wait(0.2)
Flash.Visible = false
currentHealth = health
else
if humanoid.Health <= 21 then
return
end
end
end)

5 comments
Once you disable a script, you can not reenable it...
then how can i do it ?
It's only going to flash once every time you go drop a health point below 21. I'm assuming you want it to flash while the hp is below or equal to 21, but this doesn't have a loop and is only going to run when the health changes.
Also, on line 11, it's going to change the current health to the amount of health lost. So if you had 21 health, and you lost 13, your health is going to be 13.
Then how can i fix this ? i got no ideas ;-;