Hello. I've been having troubles with making a projector like object, and I don't know what the issue is? Here's a snippit of code for what turns it on.
1 | if game.Workspace.Projector.Buttons.OnButton.On.MouseClick then |
2 | game.Workspace.Projector.Screen.Projector.M 1 Frame.M 1 Garand.Visible = true |
3 | end |
I have click detectors on the button as well.
Try this.
MouseClick is a RBLXConnection so use :Connect() to use this.
01 | local debounce = false |
02 |
03 | game.Workspace.Projector.Buttons.OnButton.On.MouseClick:Connect( function () |
04 | if debounce then |
05 | debounce = false |
06 | else |
07 | debounce = true |
08 | end |
09 | game.Workspace.Projector.Screen.Projector.M 1 Frame.M 1 Garand.Visible = debounce |
10 | end ) |