Im trying to learn the how to make a raycasting weapon by looking at a developer article, but i cant understand a line of code in there. The code is as followed:
local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p -tool.Handle.CFrame.p).unit * 300)
What i dont understand is where it says tool.Handle.CFrame.p and (mouse.Hit.p -tool.Handle.CFrame.p).unit I just dont know what .p is and .Unit i, can someone please explain?

1 comment
Thank you!