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 5 years ago
Edited by User#5423 5 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 — 5y
0
script.Parent.Parent.Bulb.SpotLight.Enabled = true ??????????? Amiaa16 3227 — 5y
0
SH is not a requesting site, we help people with code Rare_tendo 3000 — 5y

1 answer

Log in to vote
1
Answered by 5 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 — 5y
Ad

Answer this question