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

how do I use LoadAsset Method to load a GUI into the CoreGui in studio mode?

I want my plugin to not have to be used while in play solo in the studio but also without having the plugin code to have to make the plugin itself

so i'm using : game:GetService("InsertService"):LoadAsset(171822538).Parent = game.Players.Player1.PlayerGui

and I've seen some other plugins code and they do : scr = Instance.new("ScreenGui", game:GetService("CoreGui"))

so would I be able to do :

game:GetService("InsertService"):LoadAsset(171822538).Parent = game:GetService("CoreGui"))?

1 answer

As you know the CoreGui is hidden, I need more info on why you want to insert a Model in the CoreGui, are you inserting a Frame or ScreenGui into the CoreGui? Sometimes the InsertService makes the instance a model, so you'll need to get the children of the model, and set its parent from what you inserted.

2 comments

0

yes i'm inserting a screengui into the game and yeah I noticed when I insert it, it becomes a model..

0

Well I would get the children and take The screenGui out of the model and put it into the CoreGui.

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