Hello developers, I have a question, really what is the correct way to create an instance, my question is this, Suppose I have to create an instance, an example is a part, but first I give it its properties and then the parent, Example:
local Part = Instance.new("Part")
Part.Anchored = true
--And another properties...--
Part.Parent = workspace
and another example would be to create the part and give it a parent first, Example:
local Part = Instance.new("Part")
Part.Parent = workspace
Part.Anchored = true
--And another properties...--
They are the same thing. I use the first one more, just because I think it’s cleaner. Also, I suggest putting this post in #help-and-feedback:scripting-support
I’m not sure if this is still relevant today, however I believe that there is a performance negative for setting the parent first then the properties. (This could just be for the instance.new() parent property though)