So I want to make it so if the velocity of the car becomes bigger than the pitch of engine sound becomes higher, how do I do that with this script.
Or is this wrong?
Sound = idlePitch + math.max( Car.Velocity.magnitude - 10, 0) * multiplier
So I want to make it so if the velocity of the car becomes bigger than the pitch of engine sound becomes higher, how do I do that with this script.
Or is this wrong?
Sound = idlePitch + math.max( Car.Velocity.magnitude - 10, 0) * multiplier
Yeah the formula looks similar to this one, but for your scenario the equation is a piece wise function.
It’ll be constant at velocity magnitude <= 10 then scale linearly with car.Velocity beyond velocity >10 with a multiplier factor.