Decal at location of raycast hit?

I used raycasting to detect if shrapnel hit the player. I then spawned a piece of shrapnel inside the player at ray.Position.
Now, I want a small blood decal to be at the location of the impact.
The problem is, I have no clue how to do this.
My idea is to create a new part at the location and put the decal on it, the problem is, how do I make it face the correct direction? How do I make the decal part flat against the part, and how do I make the decal itself be on the right side of the decal part relative to where they were hit with shrapnel?

If you have any ideas, please share.

Haven’t tried this out before, but you may be able to use the Normal property of the RaycastResult. This should give you a Vector3 value that you can interpret to orient your decal part properly.

Raycast results have a property that gives you the face where the raycast hit. If you make a part with the decal on it and give it the same rotation as the part that the raycast hit, the blood decal will be facing the direction where it was hit.

1 Like

I already solutioned this on a previous post. Also you will need to use raycast.