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 switch?

Asked by 10 years ago

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

Thank you.

1
This is not a request site k :L Seraine 103 — 10y

2 answers

Log in to vote
1
Answered by 10 years ago

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
Ad
Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

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.

Answer this question