|
| 07 Jun 2014 09:57 PM |
This script does not work as intended. It is supposed to raise and lower the pitch depending on a VehicleSeat's throttle. This has been very confusing and frustrating for me.
Also, as a note, the output constantly prints 0 to the output when the car is idle. It STILL bypasses the first "if" statement(if v does not equal zero)
while true do wait(.2) local v = script.Parent.Throttle print(v) --output says v is 0 if v == 1 or -1 then
if script.Parent.Sound.Pitch < 1.5 then print("add") script.Parent.Sound.Pitch = script.Parent.Sound.Pitch + .1 end elseif v == 0 then if script.Parent.Sound.Pitch > .5 then print("sub") script.Parent.Sound.Pitch = script.Parent.Sound.Pitch - .1 end end end |
|
|
| Report Abuse |
|
|
| 07 Jun 2014 10:09 PM |
| Found a different method of doing this. No need for help anymore. |
|
|
| Report Abuse |
|