Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

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

Log in to vote
0
Answered by
Adryin 120
10 years ago

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.

0
yes i'm inserting a screengui into the game and yeah I noticed when I insert it, it becomes a model.. 1337zombiegamer 25 — 10y
0
Well I would get the children and take The screenGui out of the model and put it into the CoreGui. Adryin 120 — 10y
Ad

Answer this question