Roblox says I'm trying to compare a boolean with a number, but I'm not

I am trying to compare an IntValue with a number. Here is the code:

windPercentage.Value <= 7 and windPercentage.Value > 3

For some reason once the windPercentage.Value reaches 7, it prints an error saying I’m trying to compare a boolean with a number. What did I do wrong?

You didn’t do anything wrong in the code you’ve provided. We’ll need more to work with.

Oh nevermind, turns out the error was coming from another line:

if not windPercentage.Value <= 7 and windPercentage.Value > 3 then

I fixed it by putting parenthesis.