Script is suddenly stops working at print(“3”) part. No errors or anything, changing head.value to the point of heavy bleeding when there are none bleedings it just keeps doing part with print(“3”). How I could solve that?
while wait(0.1) do
if head.Value <= 80 then
lightbleeding = true
print("2")
elseif head.Value >= 41 then
lightbleeding = false
print("1")
end
if lightbleeding == true then
player.PlayerGui.MainGui.Frame.Health.ImageTransparency = 0
BloodScreen:Play()
print("3")
while lightbleeding == true do
wait(5)
hum:TakeDamage(3)
end
elseif lightbleeding == false then
player.PlayerGui.MainGui.Frame.Health.ImageTransparency = 1
print("4")
end
end
while wait(0.1) do
if head.Value <= 40 then
heavybleeding = true
print("6")
elseif head.Value >= 41 then
heavybleeding = false
print("5")
end
if heavybleeding == true then
player.PlayerGui.MainGui.Frame.Health.ImageTransparency = 0
player.PlayerGui.MainGui.Frame.LowHealth.ImageTransparency = 0
BloodScreen:Play()
BloodScreenLowHP:Play()
print("8")
while heavybleeding == true do
wait(3)
hum:TakeDamage(5)
end
elseif heavybleeding == false then
player.PlayerGui.MainGui.Frame.Health.ImageTransparency = 1
player.PlayerGui.MainGui.Frame.LowHealth.ImageTransparency = 1
print("7")
end
end