Hey guys, I am trying to create a region by using two parts as the point markers. I made a part with the size and CFrame as the region to visualize where it’s at. This is what I get back:
Here’s the code:
local point1 = script.Parent.Parent.point1
local point2 = script.Parent.Parent.point2
local region = Region3.new(point2.Position, point1.Position)
local part = Instance.new("Part")
part.Anchored = true
part.Size = region.Size
part.Parent = game.Workspace
part.CFrame = region.CFrame
part.CanCollide = false
part.Transparency = 0.6
It may be hard to tell but the two points are diagonal of each other, with one being lower than the other.
Wyzloc
(Wyzloc)
December 4, 2020, 6:10am
#2
the reason it’s flat is because your points need to be reversed.
This was the result after reversing them already. This is what it looks like if I reverse it: https://gyazo.com/4fe428d26ab78dc4402c97f0b4881901
Wyzloc
(Wyzloc)
December 4, 2020, 6:13am
#4
This is all you needed to do for reversing. The lower point goes up, the upper point goes down.
The problem merely just lies within how you position the points. Keep playing around adjusting which side each point goes, eventually you’ll get it.
Okay, I’ll do that. Thank you.
I got it. Set the region and part creation to a while loop and moved it around until it worked in test mode. Thanks again.
Wyzloc
(Wyzloc)
December 4, 2020, 6:19am
#7
No problem, should work like a charm.