How do I Add an Instance in front of the player at their lowest front?

I’m still learning more about CFrames and Vectors and I’m starting to get the hang of it, all I needed to do was read more references on formulas and using operators to make things function the way I want them to.

But I’m getting confused on making this one thing in which I want to occur which is to “Position A Part In Front Of A Player’s Front but It has to be positioned on the lowest Y Axis stopped with an object

If that doesn’t make sense, Imagine a part shadow on the player, It has to be at the floor right? That’s what I want to happen, but with a offset. LookVector front of the player + Vector3(im gonna add my own values here)

Basically my point is A part Positioned in front of the player’s floor but is stopped by a part class.

I think I need to use raycasting for this?


Yep, raycasting is used!

Here is a little place file I made for you that should be what you want. I documented it so you know whats going on.

raycastdemo.rbxl (18.9 KB)

The script can be found in StarterPlayer > StarterPlayerScripts.


Jeez thanks for doing something just for me :smiley: I appreciate it, I’ll try to comprehend the script you made.