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

Moving scripts/parts/models using scripting?

Asked by 9 years ago

I am trying to think of a way to move things such as a gui to the starter gui service without doing it from the explorer but rather with the use of scripting. Is it possible to accomplish this?

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago

Every Instance has a Parent property that allows people to (you guessed it) change the parent of an object. If you're not familiar with parents/children in context of Roblox, this may be confusing. The parent of an object is basically what it's inside. For example, if you put a part in Workspace that means that Workspace is that Part's parent and the part is a child of Workspace.

game.Workspace.Part.Parent = game.ServerStorage

This would move a Part in Workspace to ServerStorage, since we made its parent equal ServerStorage.

Ad

Answer this question