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

Certain GUI does not work on part click?

Asked by
MexheCo 46
5 years ago

I have a part that, when clicked, will clone a child gui to the player's gui. I have tried multiple screen guis, and they all work, except for my actual gui that I created. That one just doesn't appear, even though every other gui works fine with the part.

The part's code:

function boop(Player)
    if not Player.PlayerGui:FindFirstChild("Gui") then
        local gui = script.Gui:clone()
        gui.Parent = Player.PlayerGui
    end
end
script.Parent.ClickDetector.MouseClick:connect(boop)

Reference photo of my explorer here

Thanks, -Mex

2
Hello! This is weird, it should work. Voxozor 162 — 5y
1
Is there anything that could be going wrong? MexheCo 46 — 5y
1
Found it. The frame needed to be visible from the start to be able to be seen when cloned. My mistake :p MexheCo 46 — 5y

Answer this question