Please help out | How to make a click gui from a brick?

How to make a click gui from a brick?

I’ve been looking everywhere! I don’t know how to do it, so I’m sick of looking so I’m asking here if not then I’m just finished looking and trying to get help!

1 Like

You can use a click detector to detect part clicks.

local clickDetector = workspace.Part.ClickDetector
 
clickDetector.MouseClick:Connect(function()
	print("You clicked me!")
end
1 Like

I’m trying to get one like that.

You would still use a click detector, just use it to make a GUI popup.

Sorry, I don’t know how to actually do that, as I’ve never tried.

Here’s a great article about click detectors! There’s tons of info in it, so feel free to research.

4 Likes

Thanks, but I’m just trying to twist my head around it, if you are willing to help me. Please dm me via disk

MrHonorFX#4700

1 Like

You will need to make a localscript with something like this in it:

local clickDetector = workspace.Part.ClickDetector
local UI = script.Parent.UI 

enabled = false
clickDetector.MouseClick:Connect(function()
    if enabled == false then	
        UI.Enabled = true
        enabled = true
    elseif enabled == true then
        UI.Enabled = false
        enabled = false
    end
end)
1 Like

Right click and insert a click detector, then use a script to call the click detector.

Thanks, but please can you please explain more detail?

Pretty much you insert the click detector. It is a object, right clicking on a part then inserting it. Unfortunately I am on mobile, but I can give you some images if you can’t figure this out

You could use the command bar.

Instance.new(“ClickDetector”).Parent = game.workspace.part

Yes, thanks thats more helpful!

I have made a template place for you to use here:
ClickTemplate.rbxl (16.8 KB)

2 Likes

image
You need to have a click detector inside the part

Then you will have to call the clickdetector in your script (This is a local script right inside the GUI)

script.Parent.Enabled = false
game.Workspace.Part.ClickDetector.MouseButton1Click:Connect(function()
 script.Parent.Enabled = true
end

image

1 Like

You could make a click detector and when the mouse hovers over it or clicks it, it opens a GUI.

Thanks! <3 you’re a starr! nah way!