Help positioning my region3

How do I get the region to spawn in front of my character instead of in the center of my character? Here’s my mafs(The pink box represents the region)

local region = Region3.new(RootPart.Position + Vector3.new(-5,-5,-5), RootPart.Position + Vector3.new(5,5,5))

image

Over here: https://developer.roblox.com/en-us/api-reference/datatype/Region3
you can see that the new constructor of Region3 does not change the position, only the min and max size. You should change the CFrame property of region to the player with an offset.

The CFrame property is read only.

Oh, sorry. I noticed that in the code example roblox has given it is explained that the first parameter of new is the position. Have you tried make the offset bigger than 5 on all the axis?

2 Likes

sorry for the late reply but you wanna do something like this:

local region = Region3.new((RootPart.CFrame + Vector3.new(-5,-5, 5)).Position, (RootPart.CFrame + Vector3.new(5, 5, 15)).Position)

Note you can’t adjust the rotation of a region3 tho EgoMoose did make a module for that purpose. Rotated Region 3 Module

just position 2 parts such that they form a rectangular prism, copy their vector3s then rearrange their components so all the negative values are in the first minimum vector3