Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a light switch?

So I need a brick that can be clicked and then the light turn off or on.

Thank you.

1 comment

1

This is not a request site k :L

2 answers

This is not a request site, but I will tell you what to do.

You will need a ClickDetector in a brick.

You need a pointlight in the the place where the light turns on.

Use this wiki for the Click detector

mouseclick function

As for the PointLight, there is a value called Active, you toggle this by saying

game.Workspace.Light.PointLight.Active=true

or

game.Workspace.Light.PointLight.Active=true

This is NOT a request site. Please attempt the code, and if it does not work, we will help you fix it.

To start yourself off, take a look here and here.

This discussion is preserved as it was. New answers, comments, and votes are closed.