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 » Scripters
Home Search
 

Re: How can I disable a light?

Previous Thread :: Next Thread 
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 10:40 AM
I'd like to be able to disable a light in game. How can I uncheck enabled using a script?
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
13 Dec 2015 10:40 AM
Path_To_Light.Enabled = false
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
13 Dec 2015 10:41 AM
Get the light. If the script is inside of the light you'd get it like this:

local Light = script.Parent

Then it's just one line:

Light.Enabled = false
Report Abuse
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 10:46 AM
I tried game.Workspace.Halllight.SurfaceLight.Enabled = false

hallight is the parent of the surface light, not working.
Report Abuse
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 11:17 AM
Help
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
13 Dec 2015 11:23 AM
Try that using the command line in Studio and tell us if it works.
Report Abuse
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 11:30 AM
Still didn't work
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
13 Dec 2015 11:32 AM
Are you sure the light is where you say it is and it's named right?
Report Abuse
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 11:39 AM
yep. I changed the part name to hall, still not working, should it be a model?
Report Abuse
firedragonbreath37 is not online. firedragonbreath37
Joined: 12 Jun 2011
Total Posts: 1844
13 Dec 2015 11:44 AM
I'd just like to be able to shut off all lights at once.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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