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

I'm having 2 guis and want to open the other gui with gui 1 posible? [NOT ANSWERED]

Asked by 9 years ago

Ok, so i got many guis inside each other. GuiHolder < Main gui get's inserted to StarterGui Inside GuiHolder > Credit < Public showing credit and i want to add a image button to open the coming gui. Ok, here's the tricky part. Another gui inside GuiHolder "List" and inside list there's a "Frame" and inside the frame there's a frame i want to open called "Main" when clicking the image button.

Is it posible?

(pictre of how it looks in studio) tra.at.ua/Pictures/Roblox/Roblox_Studio/45361ebab6df7fba4916c3b609bae65b.png

0
PM Me on ROBLOX, fahmisack123, I'll help you out fahmisack123 385 — 9y
0
Your link is broken, please fix it. SlickPwner 534 — 9y

1 answer

Log in to vote
0
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
9 years ago

I'm not 100% sure I followed that correctly but here is what you can do. Make it so Main is initially invisible. Now we'll use MouseButton1Click to check when it is clicked and make Main visible:

local guibutton = script.Parent -- location of TextButton
local main = script.Parent.Parent.Parent.Parent.List.Holder.Main -- location of Main

local open = false

guibutton.MouseButton1Click:connect(function()
    if not open then
        main.Visible = true
        open = true
    elseif open then
        main.Visible = false 
        open = false
    end
end)

This script is the most basic way to do it. You could also fancy it up by using TweenPosition in order to make in slide in and out of the screen.

If this isn't what you were looking for leave a comment and I'll try to fix up the answer for you.

0
@MastaJames 23 The button is located in the gui under Guiholder in the gui "Credits" under "thing" And i want to open the other gui, if you close Credits, it's the next sub gui "Guiholder" "List" then "main" Master3395 10 — 9y
Ad

Answer this question