How to spawn part without dot

image

As shown in the picture, the right-hand side part is spawned by the script, and the left-hand side is spawned using UI. I want to ask how to spawn a left-hand side part without dots using script?

2 Likes

I have also came across this problem before, but the other way around. An easy solution to your problem would be to put the part spawned with ui in ServerStorage and then use the “:Clone()” function

Here is an example script:

Local Part = game.ServerStorage.Part
Local NewPart = Part:Clone()
NewPart.Parent = game.Workspace
NewPart.Position = Vector3.new(0, 0, 0) --Coordinates to create the part at

you could of-course change other properties of the part like size or color

3 Likes

uhm what its not “Local” its “local”

local Part = game.ServerStorage.Part
local NewPart = Part:Clone()
NewPart.Parent = game.Workspace
NewPart.Position = Vector3.new(0, 0, 0) --Coordinates to create the part at
2 Likes

ok, thank you so much. But I must to put in the storage, can I just spawn a part without dot?

1 Like

there might be other solutions that im not aware of. you can ofcourse change the directory of the part thats cloned. just make sure to edit the directory of it in the script too. also use the script @Rescriptedd provided as it fixed a typo i made

1 Like

okayyy y , thank you so much .

1 Like

to spawn a part without the studs without cloning one from serverstorage you can just do:

local function createInstanceWithoutSurfaces(className, parent)
	local newPart = Instance.new(className)
	for _, value in Enum.NormalId:GetEnumItems() do
		newPart[value.Name .. "Surface"] = Enum.SurfaceType.Smooth
	end
	newPart.Parent = parent
	return newPart
end

local newPart = createInstanceWithoutSurfaces("Part")
-- do some extra stuff here
newPart.Parent = workspace
2 Likes

It works ! Thank you so much !

2 Likes

no problem! :slight_smile:

1 Like

uhm excuse me who reported my post as spam

1 Like

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