Fuel value doesnt change or too huge?

I am trying to make a fuel system that you lose fuel after some conditions (Throttle, RPM, Speed), but is the number too huge/small?

print(math.huge^math.huge)
print(math.huge)
while true do
	wait()
	local waittime = script.Parent.Parent.Throttle.Value/script.Parent.Parent.RPM.Value/script.Parent.Parent.Velocity.Value.Magnitude*99999999999
	if waittime == 0 or math.huge then
		
	else
		print(waittime)
		wait(waittime)
		script.Parent.Value -= 0.1
		if script.Parent.Value <= 0 then
			script.Parent.Value = 0
			script.Parent.Parent.Parent.IsOn.Value = false

		end
	end
end

The first two lines are me trying to understand the value of math.huge.

It doesn’t do this intelligently. You need to use waittime == 0 or waittime == math.huge. I don’t see what you’re expecting here, though.

1 Like

If you drive a car and you are not driving or you are going down-hill with foot released from gas, your fuel usage will go down. If you are going fast or you are agressively accelerating, the fuel usage goes up

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.