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

How to make gui popup using ClickDetector?

Asked by 10 years ago

I hate gui's there not nice to me, but seriously how do I do it so when I click a brick a gui comes up only for the person who clicked it?

2 answers

Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
10 years ago

first, insert the gui into the playergui, and insert a frame into that gui. (Then put whatever you want in the frame).Set the visible property on the frame to false Next, put a clickdetector into the brick that u want to be clicked. Lastly, insert this script into the Clickdetector.

function Clicked(Plr)
Plr.PlayerGui.Gui.Frame.Visible=true
end

script.Parent.MouseClick:connect(Clicked)
Ad
Log in to vote
0
Answered by 6 years ago

I've been trying to do this method by actually touching a brick. Except it keeps giving me this error message. 'PlayerGui is not a valid member of MeshPart.'

Here is my script if it helps.

function Touched(Plr)

Plr.PlayerGui.ScreenGui.Frame.Visible=true end script.Parent.Touched:connect(Touched)

Answer this question