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: Car gas script won't work...

Previous Thread :: Next Thread 
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
19 Mar 2013 09:41 PM
This script is supposed to lower your gas every 20 seconds, and if your gas becomes 0, you can't drive. However, the only problem is that when the gas reaches 0, you can still drive, I don't know why. Output gave me nothing on this script... Help please!? Script:

local val = script.Parent
script.Parent.Changed:connect(function(c)
if (c=="Value") and (val.Value<1) then
script.Parent.Parent.VehicleSeat.Disabled = true
elseif not (val.Value>1) then
script.Parent.Parent.VehicleSeat.Disabled = false
end
end)

while wait(20) do
if val.Value > 0 then
val.Value = val.Value - 1
end
end
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
19 Mar 2013 09:47 PM

..

elseif not (val.Value>1) then

..

elseif (val.Value>1) then

-Alex
Report Abuse
CoolJohnnyboy is not online. CoolJohnnyboy
Joined: 09 Mar 2010
Total Posts: 17699
19 Mar 2013 09:48 PM
Help please
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
19 Mar 2013 09:50 PM
I just helped you..
Report Abuse
BruceAB12 is not online. BruceAB12
Joined: 19 Jan 2012
Total Posts: 3238
19 Mar 2013 10:25 PM
lol derp
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