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
 

Script involving throttle

Previous Thread :: Next Thread 
Aesthetical is not online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
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
Aesthetical is not online. Aesthetical
Joined: 01 Jan 2014
Total Posts: 2141
07 Jun 2014 10:09 PM
Found a different method of doing this. No need for help anymore.
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