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 Rear Lights script

Previous Thread :: Next Thread 
RobloxianWarrior3 is not online. RobloxianWarrior3
Joined: 18 Jul 2012
Total Posts: 1302
25 Sep 2014 08:33 PM
This is what I have so far. I'm a complete noob, so don't go too hard on me please.

local light = script.Parent
local v = script.Parent.Parent.Parent.Screen.Screen.a.Script.V.Value

while true do
if v ~= 0 then
light.BrickColor = "Institutional white"
else
light.BrickColor = "Really black"
end
end

_________________________________________________________________________________________

My local "v" refers to the speed value in my speedometer, which works completely fine.

When it's Really black the car isn't moving (v = 0) and when it's white, the car is moving (v ~= 0)
Report Abuse
RobloxianWarrior3 is not online. RobloxianWarrior3
Joined: 18 Jul 2012
Total Posts: 1302
25 Sep 2014 08:37 PM
help qq
Report Abuse
Rapster2 is not online. Rapster2
Joined: 16 Oct 2009
Total Posts: 1865
25 Sep 2014 08:41 PM
local light = script.Parent
local v = script.Parent.Parent.Parent.Screen.Screen.a.Script.V.Value

while wait() do
if v ~= 0 then
light.BrickColor = BrickColor.new("Institutional white")
else
light.BrickColor = BrickColor.new("Really black")
end
end


If it weren't for attorneys, we wouldn't need attorneys.
Report Abuse
RobloxianWarrior3 is not online. RobloxianWarrior3
Joined: 18 Jul 2012
Total Posts: 1302
25 Sep 2014 08:49 PM
I didn't know about "BrickColor.new" and "while wait() do" up until now. Thanks.

But I can't believe I forgot those darn parentheses around the "" again...
Report Abuse
RobloxianWarrior3 is not online. RobloxianWarrior3
Joined: 18 Jul 2012
Total Posts: 1302
25 Sep 2014 08:51 PM
Wait a sec, it doesn't turn back to white when it starts going again.
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