How do I get a bricks X and Y coordinates separately? I'm using..


	local xPosition = math.random(-2,2)
	local yPosition = math.random(-1,3)

        p.CFrame = CFrame.new(handleX + xPosition,handleY + yPosition,1)

"Handle" is basically the players torso.

(Let handleX represent x coordinate for torso) (Let handleY represent y coordinate for torso)

I'm adding a random number to said torso to get a coordinate.

I'm not sure how but can you get a bricks independent x/y coordinate?

2 comments

0

p.CFrame = CFrame.new(handleX.Position + Vector3.new(math.random(-2,2), math.random(-1,3), 1)), Position the vector3 coordinates.

0

can you use look vector in this?