Instance.new("part") behaving weird?

so i am using instance.new(“Part”) and for testing purposes i am adding the second parameter. But whenever i use it, it makes a part with the stud look on top. Is there some sort of setting I may have enabled?

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

image_2024-07-28_132722938

The part you make by clicking the button in studio is a different part to one you’d make in a script - its top surface is smooth. To make your part’s top surface smooth define the part as a variable like so:

local part = Instance.new("Part")
part.TopSurface = Enum.SurfaceType.Smooth
part.Parent = workspace

Notice how I’m setting the parent last because it is slightly faster to create a part that way when you need to assign properties to them.

That’s just the default way Parts look when using the Instance constructor

As stated, defining the parent early was only to test/write this faster, i have no intention of writing it with the parent in the parameter. But thank you for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.