Like I’m making an RTS style game. I don’t want them to have a player character. But I still want their UI to show?
1 Like
7z99
(cody)
January 19, 2023, 6:12am
#2
There are two solutions here, depending on how much you want the server interact with the client, and depending on your game’s structure, either one of these should work:
The current marked solution suggests using the client to populate PlayerGuis initially when all LocalScripts start executing and parenting all your Guis to a LocalScript. This is fine, but the thing that doesn’t sit with me right is that you’re effectively changing the structure of your game to work around one issue and the behaviour isn’t like what the engine does.
While the server’s only involvement with StarterGui is to copy those Guis and place them into the PlayerGui each time CharacterAdd…
This is about the best method i can think of. Insert a LocalScript inside StarterPlayerScripts and then parent your ScreenGui to said LocalScript like so:
[image]
and in that LocalScript you only need to type in one line which is:
script["YourGUIName"].Parent = game.Players.LocalPlayer.PlayerGui
you have to change “YourGUIName” to the name of your gui.
2 Likes