Hi. I was testing out the SurfaceGui button so that when someone clicks on it - a screen GUI should appear on the players screen by clicking on it. But I how do I fix this?
I have the following code from the script to make it work, but I think I am not right with this!
1 | function lighting()script.Parent.Parent.Parent.Parent.Parent.StarterGui.WorkingOnGui.CeilingLight |
2 | Control.Visible = true |
3 | end |
4 |
5 | script.Parent.MouseButton 1 Click:connect(lighting) |
1 | function lighting() |
2 | game:GetService( "StarterGui" ).WorkingOnGui.CeilingLight.Control.Visible = true |
3 | end |
4 |
5 | script.Parent.MouseButton 1 Click:connect(lighting) |
Or
1 | function lighting() |
2 | local Control = game:GetService( "StarterGui" ).WorkingOnGui.CeilingLight |
3 | Control.Visible = true |
4 | end |
5 |
6 | script.Parent.MouseButton 1 Click:connect(lighting) |
You're being too broad. Comment to me what you are trying to do. You can't just slap on a script and say, "Hey, fix this."