How to make low health effect

hello i was trying to make player health is lower than 30 then effect playing but i have getting a problem
this is the code i write for the low health effect but its having problem
image

this without code active

and this is when code active all system down other codes doesnt work


how i fix this problem

Instead of Cycle While Make a trigger on changing health values

Humanoid.Health.Changed:Connect(function())

In check if lowhealth bigger then health do this:

repeat

   sound()

until health > lowhealth

this time in output it says
image
Ekran görüntüsü 2024-05-07 145151

Remove the dot in-between
image

1 Like

My bad

Humanoid.HealthChanged:Connect(funcrion())

Writing code from the phone :slight_smile: