Does anyone have a script or will be able to help me with this? I am trying to make a gui that is a 1 tab when you click it the light turns on, when you click it again the light turns off.
Thanks :)
I'm not going to go out of my way to make something, but here's what it should look like:
Create a GUI button, put a local script in it. create a block or something and put a light source in it.
Put this in the button's script:
01 | light = --Put path to light here |
02 |
03 |
04 | function onClicked() |
05 |
06 | if light.Enabled = = true then |
07 | light.Enabled = false |
08 | else |
09 | light.Enabled = true |
10 | end |
11 |
12 | end |
13 |
14 | script.Parent.MouseButton 1 Down:connect(onClicked) |
You'll have to iron out the details, but this is basically how it should look.