So im making a ClickDetector brick so when you click it the gui pops up its just that the close button doesn't work with FE. the code is
function onClick(click) for i,v in pairs (script.Parent:GetChildren()) do if v.ClassName == "ScreenGui" then c = v:Clone() c.Parent = click.PlayerGui end end end script.Parent.ClickDetector.MouseClick:connect(onClick)
This answer is going off this image: [(http://twitter.com/ZARAX211/status/949489738481795072)]
function onClick(click) for i,v in pairs (script.Parent:GetChildren()) do if v.ClassName == "ScreenGui" then c = v:Clone() c.Parent = click.PlayerGui if c:FindFirstChild("Frame") then c.Frame.Close.MouseButton1Click:connect(function() c:Destroy() end) end end end end script.Parent.ClickDetector.MouseClick:connect(onClick)