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

Region3 won't cover whole area?

Asked by
Uroxus 350 Moderation Voter
7 years ago

Not used Region3 before so done a bit of research and came up with this:

local point1 = script.Parent.Region32
local point2 = script.Parent.Region31
print("Parts found")
local point1cf = point1.Position
local point2cf = point2.Position
print("locations set")

local region = Region3.new(point1cf, point2cf)

local Part = Instance.new("Part",game.Workspace)
Part.Size = region.Size
Part.CFrame = region.CFrame
Part.Anchored = true

The two 'points' are small parts indicating where I want the Region3 to be constructed and the size of it (presumably).

However from the Part used to visually outline my Region it isn't as big as I was expecting... http://prnt.sc/dvj9ih

I was hoping for a region to cover from point1 to point2, but that obviously isn't the case.

Any help would be appreciated!

0
Make sure in Region3.new the first argument is positioned below the second argument! Even by only 1 stud cabbler 1942 — 7y
0
@Cabbler they are Uroxus 350 — 7y

1 answer

Log in to vote
0
Answered by
cabbler 1942 Moderation Voter
7 years ago
Edited 7 years ago

Region3 size values can be negative for some reason, which sets some part values to 0.2. Ensure you use the absolute values of Region3 size!

Also even with the right size the part might be rotated wrong, so maybe only use the region3's position, or manually rotate the part.

Ad

Answer this question