Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a light become Enabled?

Asked by 6 years ago
Edited by User#5423 6 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

Basically. I need something that can make the "Spotlight"'s Enabled state become True via a script in the switch.

https://gyazo.com/b67f7a86de9f03421d76aadfad678097

0
Edit:- please use [text](url) for links. User#5423 17 — 6y
0
script.Parent.Parent.Bulb.SpotLight.Enabled = true ??????????? Amiaa16 3227 — 6y
0
SH is not a requesting site, we help people with code Rare_tendo 3000 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

Try This To Enable It:

script.Parent.Parent.Bulb.SpotLight.Enabled = true

And If You Want To Disable It Try This:

script.Parent.Parent.Bulb.SpotLight.Enabled = false

Also, Next Time Try Researching How To Do Something On The Roblox Developer Wiki Before Asking On Scripting Helpers: https://developer.roblox.com/api-reference/class/SpotLight

0
or you could use the not operator for a switch User#23365 30 — 6y
Ad

Answer this question