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 » Club Houses » ROBLOX Talk
Home Search
 

Re: Scripting help

Previous Thread :: Next Thread 
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
15 Sep 2012 10:49 PM
im making a throttle control for my new airplane system, so when you hold a button to accelerate I dont want the plane taking off fast, I want it realistick like a jet so the throttle goes up then a script brings up the speed of the plane o the throttle speed. theres a problem were if I put 100 for the throttle and it starts counting when I change it to 50 it dosent count back down, it waits till after it counts to 100.



heres the script.






while true do
wait()
MaxSpeed = 100
Throttle = script.Parent.Throttle
Speed = script.Parent.Speed

if Throttle.Value > MaxSpeed then
Throttle.Value = MaxSpeed
end
if Throttle.Value < 0 then
Throttle.Value = 0
end
if Speed.Value > Throttle.Value then
repeat
wait(0.5)
Speed.Value = Speed.Value - 1
print"speedChange-"
until Speed.Value == Throttle.Value or
elseif Speed.Value < Throttle.Value then
repeat
wait(0.5)
Speed.Value = Speed.Value + 1
print"speedChange+"
until Speed.Value == Throttle.Value or
end
end
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37142
15 Sep 2012 10:50 PM
Wrong forum C:
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » ROBLOX Talk
   
 
   
  • 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