-
What do you want to achieve?
I want to get the right rotation for my Region3. Example:
-
What is the issue?
The problem is that the Region3 has a false rotation of 90°. Example:
Here is the script to create the Region3:
local Height = 14
MakeRegion = function(Floor)
local VectorMin =
(Floor.Position + Vector3.new(0,Height/2+0.5,0)) + (Floor.Size + Vector3.new(0,Height,0))/2
local VectorMax =
(Floor.Position + Vector3.new(0,Height/2+0.5,0)) - (Floor.Size + Vector3.new(0,Height,0))/2
local Region = Region3.new(VectorMax, VectorMin)
local Part = Instance.new("Part", workspace)
Part.Size = Region.Size
Part.CFrame = Region.CFrame
Part.Anchored = true
Part.BrickColor = BrickColor.Green()
Part.CanCollide = false
Part.Transparency = 0.5
Part.Name = "ExamplePart"
end
MakeRegion(workspace.Floor)