Hey, I got a problem: I’m trying to “if statement” the health of a humanoid so my code is:
if humanoid.Health <= 0 then
print(“yeet!”)
end
and this error comes out:
“ReplicatedStorage.WeaponsSystem.WeaponsSystem:445: attempt to compare boolean and number”
Your script itself seems fine. The error though, isn’t. A boolean value has only two values, these being “true”, and “false”. Is that the entire script?
No it’s not, because the error is on line 445. Could I ask what the variable humanoid is from? It seems you are trying to ask a boolean value if it is less that 0, which is a number.
Right then, well, (somewhere) in the script, you are asking a boolean value if it has a value, simple answer, it doesn’t. A boolean value only has two values: true and false.
We’re under the impression that your humanoid variable is a little messed up due to this error.