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

GUI SCRIPT WONT WORK? [UNSOLVED FILTERING ENABLED]

So, this script is SO EXTREMELY EASY and I have no idea why it doesn't work, it works in every single other script but not this one. I want the GUI to become visible when I click the button thx... Here it is:

player = game.Players.LocalPlayer

playerGui = player.PlayerGui.ScreenGui

script.Parent.Parent.MouseButton1Click:Connect(function()
	
	playerGui.RedUpgradeGui.Main.Visible = true
	playerGui.RedUpgradeGui.Main.Active = true
	print("Made visible")
end)

This is a LOCAL SCRIPT Please help! This script is in StarterGui.

It even prints Made Visible!

7 comments

1

Could simply be that a parented GUI is not enabled, or the code isn't inside a LocalScript. Also I believe if the parent isn't an Image Button or Text Button then MouseButton1Click won't fire.

1

May you please show the set up for the GUI

0

The parent is a TextButton...

0

And is inside RedUpgradeGui and inside the ScreenGui.

0

This should work...

0

It even print when I usee the mousebutton1click function...

0

since your local script is in PlayerGui, just use the hierarchy of the PlayerGui to get the GUIs

1 answer

✓ Accepted answer

It might be your hierarchy?

1 comment

0

It was something else, but I dont need any help anymore so I accepted it... lol

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