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

When i tried to do a instance.new script It did not spawn anything. what should i do?

Asked by 4 years ago
Edited 4 years ago
Instance.new("Part")

It did not spawn anything

2 answers

Log in to vote
1
Answered by 4 years ago

Definite the Parent of this Instance. In this case the Parent is Workspace

Instance.new("Part", workspace)

You can also make a Variable

local Part = Instance.new("Part")
Part.Parent = workspace
Part.Position = Vector3.new(0, 40, 0)

Hope this help, to more questions put below in commentaries.

Ad
Log in to vote
0
Answered by 4 years ago

Instance.new(string className) will create a new Instance of type className. The parent of that new instance is nil.

There is another constructor of instance that lets you set the parent Instance.new("Part", workspace)

0
thx kaydengiurtino 2 — 4y
0
If this helped you please mark the answer as correct. EncapsuIation 450 — 4y
0
idk how to do that kaydengiurtino 2 — 4y
0
There is a check mark under the 0, click it EncapsuIation 450 — 4y
View all comments (2 more)
0
lol FadedJayden_Dev 118 — 4y
0
Don't use the second argument of Instance.new, it is a lot slower than parenting it after. fixmycode 86 — 4y

Answer this question