Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a GUI that popup if the SurfaceGui has been clicked?

Asked by 9 years ago

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!

function lighting()script.Parent.Parent.Parent.Parent.Parent.StarterGui.WorkingOnGui.CeilingLight
Control.Visible = true
end

script.Parent.MouseButton1Click:connect(lighting)

3 answers

Log in to vote
0
Answered by 9 years ago
function lighting()
game:GetService("StarterGui").WorkingOnGui.CeilingLight.Control.Visible = true
end

script.Parent.MouseButton1Click:connect(lighting)

Or

function lighting()
local Control = game:GetService("StarterGui").WorkingOnGui.CeilingLight
Control.Visible = true
end

script.Parent.MouseButton1Click: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."

0
Well. I am trying to do is that when a player clicks on a SurfaceGui, the GUI from the StarterGui would popup on the player's screen. BenHall4433 0 — 9y
0
Well then both of the scripts should work. EzraNehemiah_TF2 3552 — 9y
0
Is there any other scripts that I can try. Also the "CeilingLight.Control" is wrong, it should be "CeilingLightControl". :) BenHall4433 0 — 9y
0
Just change it yourself, and that's about it. EzraNehemiah_TF2 3552 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

I wuv u Ben

Log in to vote
0
Answered by 9 years ago

Anyone help me with this??

Answer this question