Simple Region3 Problem

Hi everyone, I’m trying to make regions, but Line 5 of my code doesn’t work, saying that CFrame cannot be assigned to. I don’t know how to resolve this since I need CFrame to position my Region3 correctly. Thanks for the help :smiley: !


local Region1 = Region3.new(Vector3.new(-12.735, 31.292, 72.565),Vector3.new(86.265, 130.289, 171.565))

Region1.CFrame = CFrame.new(36.265, 31.292, 122.065)

local part = Instance.new("Part")

part.Anchored = true
part.CanCollide = false
part.Size = Region1.Size
part.Parent = game.Workspace
part.CFrame = Region1.CFrame

Hey there!

You can’t somehow change the origin of already existing CFrame.
You can just specify the Position1 and then Position2, create the Region3 and that’s all. You can’t move the Region3 as a classic part.

Here is some image that I made for better understanding (if you can understand it :rofl:)

I hope this helped you!
Have a nice day!

1 Like

I knew that this was how region3s worked. But my script generates a part to visualize WHERE that region3 is. The part that spawns is wayyy off, despite Position 1 and 2 being rightly placed. Would that mean that the region is in the right place but not the part?

By the way I love that drawing, keep working and one day you’ll earn millions from it

1 Like

Can you make a part and position it at the min and max of the Region3?

That’s what I did, with the same result…

Can you provide a screenshot of the result? I tried reproducing this, and it is working.

I added a print statement when a part is detected and it turns out this works, the prt was just going to pos0,0,0 even though the Region3 was in the right position. Thank you for your help :+1: