generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: *sigh* What's the issue here?

Previous Thread :: Next Thread 
Boomboy45 is not online. 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 is not online. 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
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
10 Feb 2013 11:24 PM
> VS = script.Parent
> if VS ~= nil then

wait wut?

---------
i liek pineapples.
Report Abuse
Boomboy45 is not online. 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 is not online. Boomboy45
Joined: 12 Oct 2008
Total Posts: 3720
11 Feb 2013 07:05 PM
Day two.

wow
Report Abuse
Boomboy45 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image