This script is located inside the Humanoid of a model. I'm trying to detect the health if it's less than or equal 200 then it plays a warning sound. Help?
local H = script.Parent.Health local Warning = game.Workspace.Warning while true do if H <= 200 then Warning:Play() end if H > 200 then Warning:Stop() end wait() end
local H = script.Parent.Health local Warning = game.Workspace.Warning while H <= 200 do wait() if not Warning.IsPlaying == true then Warning:Play() end end while H > 200 do wait() if Warnin.IsPlaying == true then Warning:Stop() end end
~Thank me by accepting this answer/bumping up my reputation!