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

Why is my GUI not showing up on the screen?

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.

4 comments

0

Its Because Of The Scale

0

so... the gui is not scaled (adjusted) to different sizes of screens.. try to put it in the middle and then start the game and it should be moved to the side a bit if its not adjusted

0

im having the exact same problem

0

It is in the middle; already tried that.

1 answer

✓ Accepted answer

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)

2 comments

0

Thank you so much! I thought this was going to be an answer but second guessed myself. I guess this was the answer. Again, thank you!

0

No problem!

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