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

How would i make a button after closing it's main frame open all the other frames??

Hi so i have a script here :

function parentPressed()

	game.Lighting.Blur:Destroy()
	script.Parent:Destroy()
	game.Players.LocalPlayer.PlayerGui.Intro:Destroy()
	game.StarterGui.Intro:Destroy()
	wait(2)


	game.StarterGui.Notice.Frame.Visible = true
	game.StarterGui.MainGUI.Frame.Visible = true
	game.StarterGui.MainGUI.Frame2.Visible = true
	game.StarterGui.MainGUI.ImageLabel.Visible = true
	game.StarterGui.ScreenGui1.Frame.Visible = true
end
script.Parent.MouseButton1Down:connect(parentPressed)

So if you click the Button it will

	game.Lighting.Blur:Destroy()
	script.Parent:Destroy()
	game.Players.LocalPlayer.PlayerGui.Intro:Destroy()
	game.StarterGui.Intro:Destroy()
	wait(2)

Destroy and close all the other stuff , but when i try :

	game.StarterGui.Notice.Frame.Visible = true
	game.StarterGui.MainGUI.Frame.Visible = true
	game.StarterGui.MainGUI.Frame2.Visible = true
	game.StarterGui.MainGUI.ImageLabel.Visible = true
	game.StarterGui.ScreenGui1.Frame.Visible = true

Wont work all the gui are still visible = false How would i fix this?

1 answer

Use the local player's PlayerGui, not the StarterGui.

Guis in the PlayerGui are the UIs that the local player has on their screen. The StarterGui is for giving players that join the Guis in that folder.

Hopefully I explained this well

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