Just a small question, how would you get the 2 corners for a region3 without adding any parts. I have this small bit of code and at the moment using a part with cancollide false.

	local hitbox = workspace:WaitForChild("hitbox")
	local corner1 = hitbox.Position - (hitbox.Size / 2)
	local corner2 = hitbox.Position + (hitbox.Size / 2)
	local hitboxRegion = Region3.new(corner1, corner2)

	while wait() do
		local partsInRegion = workspace:FindPartsInRegion3WithIgnoreList(hitboxRegion, {hitbox})
	
		print(#partsInRegion)
	end

Any help appreciated!

3 comments

0

What is the current result of the code? Does it give you a hitbox, but just not where you'd expect? Or does it not create the region period? We need more detail on the issue before attempting to solve the problem.

0

it creates it, im just looking for a way to not have to use a part every time

0

just for a quicker way to get the positions