How to Use CFrames

Hey everyone,

I have a question that I can’t figure out on my own, mainly because I don’t understand CFrames.

I’ve made a skydiving script, and it can detect when the player is landing on the ground. Although, I’m having trouble detecting when a player is landing on a house or any other object that’s above the ground.

My solution to this problem is this:

  • Create a BasePart

  • Use CFrame to make the part move to the top of any object the player is flying above

  • Calculate the magnitude from the BasePart to the player’s HumanoidRootPart

Keep in mind, I don’t understand CFrames, so I have no clue how to do the second step.

Could someone please tell me how to do this? In layman’s terms, please.

Thanks in advance.

2 Likes

You know you can use rays to detect if a player is about to hit something too?

Also here’s a link for CFrames which may help you understand what they are more precisely:

3 Likes

Thanks for the suggestion! I’ve never used rays, but they seem much easier to manipulate than CFrames, I’ll definitely look into it.