Hi there! I've been scripting a few months now and I'm trying to use GUIs, but they just aren't working. Could someone please help me?
This script is in a local script, not a script. I don't know if that's the problem or not.
script.Parent.MouseButton1Click:Connect(function() game.StarterGui.ModPanel.Enabled = true --// Opens the GUI script.Parent.Parent.Parent.Enabled = false --// Button to open GUI game.StarterGui.ModPanel.ModPanel.Active = true --// The second ModPanel is a frame. end)
When I go and test the game, it says that everything is active/enabled, but it doesn't show that.
I'm hoping someone can help me as I have no idea what's happening and the output isn't showing me.
It's because you're opening the GUI in the StarterGui, not in the PlayerGui (it's in the guis that the player can see)
Try this
local player = game.Players.LocalPlayer --Gets the player that the localscript is in local playerGui = player:WaitForChild("PlayerGui") --Gets the player GUI script.Parent.MouseButton1Click:Connect(function() playerGui.ModPanel.Enabled = true --// Opens the GUI script.Parent.Parent.Parent.Enabled = false --// Button to open GUI playerGui.ModPanel.ModPanel.Active = true --// The second ModPanel is a frame. end)