So I've been trying to make a region3 right where the player's mouse intersects with an object and 1 stud past it in line with the player's sight.

I've changed it to my format without using raycasting, but the problem remains the same.

local region = Region3.new(mouse.Hit.p, mouse.Hit.p-Vector3.new(1,1,1))--the second argument is what I need help with
	print(region.CFrame," SIZE ",region.Size)
	workspace.Part.CFrame=region.CFrame
	region = region:ExpandToGrid(4)
    local material,occupancy = game.Workspace.Terrain:ReadVoxels(region, 4)
	print(material[0][0][0])

9 comments

0

No need to use a ray. Just check Target then use hit.

0

Ok, then how do I get a point in front of that that lines up with a line from the camera's position to the mouse.Hit.p

0

You just draw the region3 from the mouse position there is no rotation for region3 ?

0

what do you mean about rotation? I need 2 points in order to make a region3, I have the mouse.Hit.p, but how do I get the next point.

0

P + your size?

0

what do you mean? what size?

1

ur waist size

0

lol ^

0

I really thought I would get an answer coming here, maybe I'll go to another site where they actually try to help people instead of insult them in the comments of their questions.