Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What does CFrame.p Mean?

What does CFrame.p Mean? Its in a wiki ray casting script

local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300)

1 answer

Just a head's up, try searching the wiki first for Object members or properties.

As it says there, the p member of a CFrame object is a Vector3 that represents the X, Y, Z Position of the CFrame, without rotation.

Both mouse.Hit and tool.Handle.CFrame use the p member, because they are both CFrame objects.

1 comment

1

Put succinctly -- A CFrame's p is the position of the CFrame, forming a Vector3. The position lacks the orientation (rotation) information that the CFrame has.

This discussion is preserved as it was. New answers, comments, and votes are closed.