I want to make a game where players can place blocks. In order to do so I have to find the position that the mouse is pointing at. How can I do this? I was reading somewhere that I can do this using rays. Can someone also explain what are rays, and how are they used?
The quickest way to do this would be just doing this in a localscript
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() while true do--showcasing purposes print(mouse.Hit.Position) wait() end
mouse.Hit being a CFrame, and mouse.Hit.Position being the position component of that CFrame