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: Roblox local lighting?

Previous Thread :: Next Thread 
LiamScerri is not online. LiamScerri
Joined: 10 Oct 2010
Total Posts: 560
29 Jan 2013 10:58 AM
Explanation?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
29 Jan 2013 11:02 AM
Have settings as variables in the script. Say, something like this:


local myAmbience = Color3.new(0,0,0)


Then use a Changed event from Lighting, using your saved values to use as test cases.

game.Lighting.Changed:connect(function()
    if not (game.Lighting.Ambience == myAmbience) then
        game.Lighting.Ambience = myAmbience
    end
end)


This must be a LocalScript.
Somehow, it doesn't crash the client. All I know is it works.
The full script would be:


local myAmbience = Color3.new(0,0,0)

game.Lighting.Changed:connect(function()
    if not (game.Lighting.Ambience == myAmbience) then
        game.Lighting.Ambience = myAmbience
    end
end)
Report Abuse
LiamScerri is not online. LiamScerri
Joined: 10 Oct 2010
Total Posts: 560
29 Jan 2013 04:04 PM
Thanks for the help.
Report Abuse
LiamScerri is not online. LiamScerri
Joined: 10 Oct 2010
Total Posts: 560
29 Jan 2013 04:05 PM
I'm guessing you could do the same for fog and such?
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