How do I make a RAYCAST visible? (Not a ray)

So basically I need to be able to see a raycast cause mine is acting weird. But I dont know how I would make it so I can see it.

How would I do this??

Note raycast not ray. They are two different things

So I have to admit, I didn’t know ray and raycast was two different things, thank you for educating me.
But reading up on the definition of a raycast, I am confused as to what you wanna achieve.
Like you wanna visualize the process in which a ray detects in-game objects? Can you give a drawing or some form of example?

I want to basically be able to SEE the raycast. Basically by putting a part where the raycast would be and setting the size so its as long as the raycast.

If you need any of my already code tell me!

Also thanks!

If you wanna create a part where the raycast lands, why not just get the position property of the raycast and :clone/Instance.new a part to that position? Regarding the size, I don’t think raycast has a size property, that doesn’t mean you can’t resize the part you created to your liking.

This devforum post will help:

Or use @Dude_Danish 's advice.

Not where the raycast hits where it IS like to put a part in the middle of the raycast and scale it to be the size of the raycast

Well thats pretty easy to do.
First you gotta get the position for your part.
Lerp between startPos and the hit or end position of the ray.

Then you create a part at that position.
After that you get the magntiude of the ray and then multiply that by your size(just one axis you can decide which one but I think x would be correct here).

From there you now have your part on your raycast.

TLDR:
Lerp between raycast start and end and make size magnitude of ray.

Note:
@Haso’s post is just a slightly more advanced version. You would also probably want to use CFrame.LookAt to align your parts Cframe after you were done positioning it.