How would i visualize a region3

i want to see how big my hitbox is , but i dont know how to show it in studio

1 Like

This might help: Model | Documentation - Roblox Creator Hub

Also there is a studio setting to show Bounding Boxes as well.

@Dev_Ryan Sorry, but unfortunately the bounding box function only works for models and not for region3

for the region3 visualization question you use this set of code which I stole off google “Roblox region 3 visualizer” in this thread.

Yeah you just create a part representing the region3.

local region3 = Region3.new(workspace:WaitForChild("rg1").Position, workspace:WaitForChild("rg2").Position)
local regionVisualizer = Instance.new("Part")
regionVisualizer.Name = "rV"
regionVisualizer.Anchored = true
regionVisualizer.Size = region3.Size
regionVisualizer.CFrame = region3.CFrame
regionVisualizer.Parent = workspace

Unfortunately, there is no function for region 3 to visualize it from the documentation, we gotta make our own using parts from the properties of the region3.

6 Likes

Oh my bad. I assumed when he said to visualize the hitbox that there was already a part existing. So yea creating a new temporary part would be the case then.

Just modified @dthecoolest script a lil bit to make it easier to visualize and convert a region3 into a part for visualizing.

function visualizeRegion3(region)
	local regionVisualizer = Instance.new("Part")
	regionVisualizer.Name = "rV"
	regionVisualizer.Anchored = true
	regionVisualizer.Size = region.Size
	regionVisualizer.CFrame = region.CFrame
	regionVisualizer.Transparency = .25
	regionVisualizer.Color = Color3.fromRGB(255,0,0)
	regionVisualizer.TopSurface = Enum.SurfaceType.Smooth
	regionVisualizer.BottomSurface = Enum.SurfaceType.Smooth
	regionVisualizer.Parent = workspace
end