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

GUI SCRIPT WONT WORK? [UNSOLVED FILTERING ENABLED]

Asked by
Oficcer_F 207 Moderation Voter
5 years ago
Edited 5 years ago

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!

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. XxSWxX 18 — 5y
1
May you please show the set up for the GUI KawaiiX_Jimin 54 — 5y
0
The parent is a TextButton... Oficcer_F 207 — 5y
0
And is inside RedUpgradeGui and inside the ScreenGui. Oficcer_F 207 — 5y
View all comments (3 more)
0
This should work... Oficcer_F 207 — 5y
0
It even print when I usee the mousebutton1click function... Oficcer_F 207 — 5y
0
since your local script is in PlayerGui, just use the hierarchy of the PlayerGui to get the GUIs User#23365 30 — 5y

1 answer

Log in to vote
1
Answered by
acoo250 20
5 years ago

It might be your hierarchy?

0
It was something else, but I dont need any help anymore so I accepted it... lol Oficcer_F 207 — 5y
Ad

Answer this question