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

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

Asked by 6 years ago

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

Log in to vote
-1
Answered by 6 years ago

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!

1
Thanks. ^-^ I was kinda confused on how to do it. SoveDaSpooker 3 — 6y
0
You are welcome! :) please mark my answer as the answer to your question whenever you can. Le_Teapots 913 — 6y
Ad

Answer this question