How to get the distance of the mouse if the player click the air (or the sky)

I would like to know if there is a way to get the position and distance of the mouse if it is clicked in the air.

An example:
The maximum distance would be 40 studs; if the mouse is clicked in the air, then it will create a part that is a maximum of 40 studs away.

image

1 Like

I would just say ray cast

I think this is how you would do the Raycast

Ray.new(Ex.Position, Mouse.Hit.p.Unit * 40)
1 Like

Thanks, that actually works.
image

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.