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
 

How do I change ambient with a script?

Previous Thread :: Next Thread 
Isometricity is not online. Isometricity
Joined: 26 Oct 2011
Total Posts: 438
20 May 2012 02:59 PM
I tried "game.Lighting.Ambient = 0; 0; 204" but for some reason, it isn't working. Did I do something wrong, or is it right and I just spelled something wrong?
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
20 May 2012 03:02 PM
Color3

game.Lighting.Ambient = Color3.new(0, 0, (204/255))

Color3 is out of 1, so thats why it has (204/255)
Report Abuse
Isometricity is not online. Isometricity
Joined: 26 Oct 2011
Total Posts: 438
20 May 2012 03:04 PM
So, how do I change the (204/255) to do a different color??

game.Lighting.Ambient = Color3.new(0, (205/255), 0)?
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
20 May 2012 03:07 PM
yep, you got it :) if you dont want to mess about with brackets, do the sum on a calculator then just put in the value: 204/255 = 0.8

game.Lighting.Ambient = Color3.new(0, 0.8, 0)
Report Abuse
jack48271 is not online. jack48271
Joined: 16 Jan 2009
Total Posts: 2608
20 May 2012 03:17 PM
I'm probably wrong because I'm not much of a scriptwriter but couldn't you do...

game.Lighting.Ambient.Brickcolor = "blue"

Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
20 May 2012 03:17 PM
first, BrickColor, second, "Bright blue" or "Really blue", third, no, sorry
Report Abuse
gamehero is not online. gamehero
Joined: 12 Jun 2007
Total Posts: 1455
20 May 2012 03:26 PM
This is the only way I know how to do it like that.

game.Lighting.Ambient = BrickColor.Blue().Color


It's kind of pointless though. Color3 is still better once you get the hang of it.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
20 May 2012 03:29 PM
For clarification about the Color3.new:

The arguments are between 0 and 1, not between 0 and 255 as the properties tab shows you. So, to enter it in the script, whatever you see in the properties tab must be divided by 255.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
20 May 2012 03:30 PM
Correct. [255/255 = 1] [0/255 = 0] It makes sense to divide by 255 if you think about it :)
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