|
| 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
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 13 Dec 2015 10:40 AM |
| Path_To_Light.Enabled = false |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 13 Dec 2015 11:23 AM |
| Try that using the command line in Studio and tell us if it works. |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2015 11:32 AM |
| Are you sure the light is where you say it is and it's named right? |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2015 11:39 AM |
| yep. I changed the part name to hall, still not working, should it be a model? |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2015 11:44 AM |
| I'd just like to be able to shut off all lights at once. |
|
|
| Report Abuse |
|
|