Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can a brick take the form of a circle?

Can the classic brick take the form of a circle? I was thinking that maybe we could change the size property of the brick to a circle? i.e. something like test_brick.size = circle or brick.CFrame = circle...

9 comments

0

sphere or cylinder?

0

both

0

Just flatten one of the cylinder's faces and you get a circle...?

0

^

0

I'm looking for my brick to take a circular shape rather than square.

0

Why not use a mesh?

0

I'm just doing an experiment with what's possible and what isn't - I want to see how flexible a brick can be, does this make sense?

0

My specific context is that I'm experimenting with rays and I want a ray in the form of a circle - I want to project one ray shaped like a circle NOT project many small rays that together form a circle. I want to project once!

0

i dont understand

1 answer

Yes you can turn the plain old block into a sphere or cylinder with the Shape property. There are 3 shapes to consider.

local part = Instance.new("Part",workspace)

local function ChangeShape(shape)
	part.Shape = Enum.PartType[shape]
	print(part.CFrame)
end

while true do
	ChangeShape("Ball")
	wait(1)
	ChangeShape("Cylinder")
	wait(1)
	ChangeShape("Block")
	wait(1)
end

4 comments

0

Thanks for your answer. Does changing the shape also change the CFrame of the brick (does part.CFrame change)?

0

Nope it doesn't change. You can find that out by inserting print(part.CFrame) into the function. Here, I'll add that in for you.

1

So could you elaborate on what is happening, behind the scenes, when you change the part type? Is a new mesh being applied or what?

0

For that, I don't have an answer. Probably post that as a different question and see if anyone knows.

This discussion is preserved as it was. New answers, comments, and votes are closed.