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

[Solved] Converting Region 3 Script?

Asked by
262187 45
9 years ago

I have this script, it works, I just don't know how to convert it back to where I can use two arguments to create a box like it shows on wiki http://wiki.roblox.com/index.php?title=API:Region3 I need something like "Region3.new( Vector3.new(1, 1, 1), Vector3.new(9, 9, 9) ) -- a Region3 with a size of (8, 8, 8) and a position at (5, 5, 5)" but I don't know how to convert it, can you help?

local adminPad = workspace.SecretBrickDontDelete
local boxDimensions = Vector3.new(24.775, 19.5, -11.386) 

local region3 = Region3.new(adminPad.Position - boxDimensions/2, adminPad.Position + boxDimensions/2)

while wait(0.5) do 
        local parts = workspace:FindPartsInRegion3(region3, adminPad, 50)
        for i = 1, #parts do
                if parts[i].Name == "BuildingBrick" and parts[i].Anchored then
                        parts[i]:Destroy()
                end
        end
end

Answer this question