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

How to I change the new instance and move the part it created?

How do I take

instance.new("Part", workspace)

, and make it insert anything into any category? Like a screengui into startergui, or a a brick in server storage. I'm just asking how you change "workspace" into a different section. I'd also like to know how you take a part/GUI and move it to a different section. It would help if someone gives me a list of the different ways to move/create the new

1 answer

Instead of typing "workspace" you could write any other destination of your choice. Following your StarterGui's example, to insert a ScreenGui into it you would execute:

Instance.new("ScreenGui", game.StarterGui)

Note that instead of worskpace we wrote "game.StarterGui" to let the script know to parent the new part to the StarterGui. Of course you are not limited to just that, lets say you wish to insert a part inside a model named "BrickSet", then you would write:

Instance.new("Part", game.Workspace.BrickSet)

Hope this helps!

2 comments

1

Thanks. ^-^ I was kinda confused on how to do it.

0

You are welcome! :) please mark my answer as the answer to your question whenever you can.

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