How to show UI in game?

I have a screen GUI that needs to be shown. But the problem is that I am running the program instead of playing the game as a player. Is there a way I can show the ScreenGui while I “Run” the game?

I tried using ScreenGui.Parent = game.CoreGui but it didn’t work. :sob:

I’m pretty sure you can just click on the screengui, and on properties just click enabled, assuming that it is inside the playergui.

But player Gui only works in game as a player. Running the game acts as a “Server Sided” play. This means it doesn’t show. There is no player to show the gui to if it is in PlayerGui.

What do you mean? there has to be a player

If you run the game and not play it, you do not spawn as a player. The reason the folder is called “PlayerGui” is because it is local to the player only. If it wasn’t then everybody could see the same ui.

Have you tried it? I just tried it myself and it works even when I’m only “running” the game. (serverside). And if you mean actually using the gui, I don’t think that would work serverside.

Are you trying to get some kind of Plugin behavior right here? Since as far as I know the CoreGui needs a player too, if not, then it shouldn’t have anything to show, right? I may be wrong, but stills my question, is this for a Plugin?

Edit: So it seems that I was kind of “right”, since the CoreGui service it is the one that is in charge of creating the GUI elements via in-game for the core-user interface.

Yes, but this is not for a plugin. I don’t know why this works on a plugin and not here.

If you’re trying to do this server-side within the Run test mode of studio, you can’t show guis to my knowledge. Your best bet would be using a plugin and there’s plenty of functions within RunService you can use to determine if it’s the server and what not.