maxfuel = 100 function Overflow() if script.Parent.MaxFuel.Value > maxfuel then script.Parent.MaxFuel.Value = 100 end end script.Parent.MaxFuel.Value.Changed:connect(Overflow)
It's to check if the car's fuel tank has overflowed, and if it does, it'd reset it to 100. Although, it's not working for me. Any tips?
Sorry I don't completely understand the question, but correct me if I am wrong
Wouldn't it be
maxfuel = 100 function Overflow() if script.Parent.MaxFuel.Value > maxfuel then script.Parent.MaxFuel.Value = 100 end end script.Parent.MaxFuel.Changed:connect(Overflow)
All I did was removed the ".Value" part of the event.