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

Can a brick take the form of a circle?

Asked by
Ribasu 127
5 years ago
Edited 5 years ago

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...

0
sphere or cylinder? brokenVectors 525 — 5y
0
both Ribasu 127 — 5y
0
Just flatten one of the cylinder's faces and you get a circle...? hiimgoodpack 2009 — 5y
0
^ DaWarTekWizard 169 — 5y
View all comments (5 more)
0
I'm looking for my brick to take a circular shape rather than square. Ribasu 127 — 5y
0
Why not use a mesh? User#21908 42 — 5y
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? Ribasu 127 — 5y
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! Ribasu 127 — 5y
0
i dont understand andrewcooke582 -52 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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
0
Thanks for your answer. Does changing the shape also change the CFrame of the brick (does part.CFrame change)? Ribasu 127 — 5y
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. MooMooThalahlah 421 — 5y
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? Ribasu 127 — 5y
0
For that, I don't have an answer. Probably post that as a different question and see if anyone knows. MooMooThalahlah 421 — 5y
Ad

Answer this question