How would I visualize a RayCast? I’ve successfully learned how to use raycasting very basically, yet I don’t know how to visualize it yet. What I mean is, I’d like to actually see the ray, how would I do that? Here’s the code:
local start = script.Parent.Start
local fin = script.Parent.Finish
local rayorigin = start.Position
local raydest = fin.Position
local raydire = start.CFrame.LookVector*50
local ray = Ray.new(rayorigin,raydire)
local part = workspace:FindPartOnRay(ray, script.Parent)
print(part)
And where the script is located: