Wie kann ich mein GUI mit einem ImageButton oder dem roten X-Button öffnen und schließen?

1 Antwort

  1. In das UI Objekt ein local Script hinzufügen.
local UiButton = script.Parent
local ShopFrame = —[dein Shop objekt]

UiButton.MouseButton1Click:Connect(function()
ShopFrame.Visible = True —Oder False beim X
end)

beim ImageButton würde ich aber eher das machen:

local UiButton = script.Parent
local ShopFrame = —Shopframe

UiButton.MouseButton1Click:Connect(function()
if ShopFrame.Visible == true then
Shopframe.Visible = false
else
Shopframe.Visible = true
end
end)

Ich habe lange kein Roblox Studio mehr benutzt, also kann es sein dass ein paar Fehler in den Script sind.

Woher ich das weiß:Hobby – Programmiere spiele seit 2018