Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

3 comments

0

PM Me on ROBLOX, fahmisack123, I'll help you out

0

Your link is broken, please fix it.

1 answer

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.

1 comment

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"

This discussion is preserved as it was. New answers, comments, and votes are closed.