so i wanna know if a value is inbetween 2 other numbers for ex if 1 value is inbetween 4000 and 5000, how do i do that?

my attempt:

if script.Parent.Values.RPM.Value <= 5000 and script.Parent.Values.RPM.Value >= 4000 then
	print("f")
end

4 comments

0

There doesn't seem to be anything wrong with this. Are you getting an error or does nothing print? Is script.Parent.Values.RPM.Value a valid pathway?

0

What exactly is RPM. If it's a stringValue the for loop won't be true. You're going to have to convert it to a number using tonumber().

0

its a numbervalue, yes its a valid pathway and im getting no error and no print

0

ok i fixed it i didnt realize it but i didnt make it so it runs it when the value was changed thx for yall help yes