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 move a property into a different "directory"?

I have a ScreenGui for a loader and I want to move it into StarterGui. How do I do that? (its in a folder called Module, and the gui is called ScreenGui)

1 comment

0

If the folder is in serverstorage, do game.ServerStorage.Module.ScreenGui.Parent = game.StarterGui

1 answer

I think you mean moving an object or instance into a different "directory" in your title, not a property.

Nevertheless, to move an object/instance, you can simply reassign its Parent property to the new location you want it to be in. In your case, you want to move a loading GUI into the StarterGui, however, another mistake that I have found is that you should not be parenting objects to StarterGui during the runtime of the game. StarterGui is only replicated to a player's PlayerGui when he/she joins and each time he/she respawns, thus any changes you make to it won't be applied until the next respawn time.

That is why I recommend you parent your loading GUI directly to the player's PlayerGui. For example:

Module.LoadingGui.Parent = player.PlayerGui

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