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

How to make a part that fills the volume of a region3?

Asked by 9 years ago

I'm trying to make a part where the corner is one specific position, and the other corner is a specific position in a region3 (which forms a cube for a part to fill), anyone know a function/algorithm to do this? If it's a algorithm, make it something like this, so it's easy to understand:

function partFromRegion3() -- Returns the size and position of a brick
    -- do stuff here
        return position, size
end

1 answer

Log in to vote
0
Answered by 9 years ago

Can't you just use the properties of a region3? Size and CFrame

local Region = Region3.new(Vector3,Vector3)

local Part = Instance.new("Part",Workspace)
Part.Size = Region.Size
Part.CFrame = Region.CFrame
Ad

Answer this question