Boomboy45
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 3720 |
|
|
| 10 Feb 2013 10:38 PM |
What this is supposed to do is slowly accelerate a VehicleSeat car's MaxSpeed to the indicated amount based on the "Gear" value. I have a gear & clutch system that I just made which works seamlessly, but this script does literally nothing.
When I hit W, it should slowly build speed to the amount shown in the gear, and when I change up, accelerate some more at a slower rate. At the moment, though, it does absolutely nothing. It crossed my mind that "wait()" could be the wrong sort of loop, but I don't know.
No output complaints. Let's see what ya'll can do.
NOTE: In case you're baffled, Torque is 10. --------------------------------- VS = script.Parent gear = script.Parent.Gear
wait()
if VS ~= nil then if (VS.Throttle == 1) and (gear.Value == 1) then if VS.MaxSpeed < 24 then VS.MaxSpeed = VS.MaxSpeed + (VS.Torque*0.2) end end if (VS.Throttle == 1) and (gear.Value == 2) then if VS.MaxSpeed < 37 and VS.MaxSpeed > 20 then VS.MaxSpeed = VS.MaxSpeed + (VS.Torque*0.19) end end if (VS.Throttle == 1) and (gear.Value == 3) then if VS.MaxSpeed < 49 and VS.MaxSpeed > 34 then VS.MaxSpeed = VS.MaxSpeed + (VS.Torque*0.174) end end if (VS.Throttle == 1) and (gear.Value == 4) then if VS.MaxSpeed < 65 and VS.MaxSpeed > 47 then VS.MaxSpeed = VS.MaxSpeed + (VS.Torque*0.156) end end if (VS.Throttle == 1) and (gear.Value == 5) then if VS.MaxSpeed < 80 and VS.MaxSpeed > 63 then VS.MaxSpeed = VS.MaxSpeed + (VS.Torque*0.134) end end elseif VS.Throttle == -1 then if VS.MaxSpeed > -30 then VS.MaxSpeed = VS.MaxSpeed - (VS.Torque*0.2) end end
---------------------------------
wow |
|
|
| Report Abuse |
|
|
Boomboy45
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 3720 |
|
|
| 10 Feb 2013 11:21 PM |
Gonna bump this up and go to bed, lest I fix it myself in the next few minutes.
wow |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2013 11:24 PM |
> VS = script.Parent > if VS ~= nil then
wait wut?
--------- i liek pineapples. |
|
|
| Report Abuse |
|
|
Boomboy45
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 3720 |
|
|
| 10 Feb 2013 11:26 PM |
Lawl, I was editing this from another script. It had that as a line, so I took it. Didn't occur to me that it could be problematic.
wow |
|
|
| Report Abuse |
|
|
Boomboy45
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 3720 |
|
| |
|
Boomboy45
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 3720 |
|
|
| 11 Feb 2013 07:32 PM |
46 views and only my bump since yesterday?
qq
wow |
|
|
| Report Abuse |
|
|