Possible To Map Instance As Type To Variable

game.StarterGui holds the UI but player.PlayerGui doesn’t, therefore removing any IntelliSense for the PlayerGui folder. Is it possible to map the game.StarterGui instance as a type to a variable that holds a PlayerGui folder instance?

Visual:

local Player = game.Players.R0bl0x10501050
local PlayerGui: game.StarterGui = Player:WaitForChild("PlayerGui")

I’m assuming not.

No, I believe core ROBLOX code uses StarterGui and simply clones any objects to the LocalPlayer. It might even be via. server code because I believe you can clone UI objects to a client’s PlayerGui via. server. But to answer your question, unfortunately you cannot change what core scripts use to display UI on a client screen.

I believe you misinterpreted my question.

When you type game.StarterGui in a script, you get the Intellisense for its children. However, when you type <player>:WaitForChild(“PlayerGui”), you don’t get the Intellisense even though Lua knows the children of it already. I am asking if you can map an instance to a variable’s type (like string or number) so the children can be autocompleted.

Oh! I don’t think you can do this either. Partly explained in my original reply, the server (or core client not sure) clones over the UI content from StarterGui. There isn’t anything in the PlayerGui when you’re editing code and not in a session. I think you’d need to change the front-end code of the studio application to do this. But this would be a cool feature.