Hi all!
Just found this tutorial on the official developer wiki and it mentions the "p" property of CFrame. Couldn't find a "p" property in the documentation of CFrame so asking for some quick help here.
From https://developer.roblox.com/en-us/articles/Making-a-ray-casting-laser-gun-in-Roblox:
Raycasting
Now that we’ve got our framework set up, let’s get started on casting a ray. Add this to your mouse down function:
local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - toolHandle.CFrame.p).unit * 300)This will create a ray that starts at the center of the tool’s handle
(tool.Handle.CFrame.p)and goes out 300 studs towards the mouse’s position
((mouse.Hit.p - tool.Handle.CFrame.p).unit * 300)