So I'm trying to make a local script that checks the player's health in between a point. For ex:
local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
if humanoid.Health < 60 and > 50 then
script.Parent.ImageLabel.ImageTransparency = 0.8
elseif humanoid.Health < 50 and > 40 then
script.Parent.ImageLabel.ImageTransparency = 0.8
end
This is the script I wrote and it doesn't work. I don't know how to check what health the player has in between those numbers without it erroring. Thank you for your time. - Zeta

2 comments
remove the other greater than operator (>) in 2 and 40 it should be if humanoid.Helth < 60 and 50 then
also, elseif humanoid.health <50 and 40 then