I have a script below that I am using as a reference. I am wondering how I can make a Ray between two parts I have in Workspace. The parts are named "Part" and "Part1".
Reference -
local Ray = Ray.new(game.Workspace.vislbIe.HumanoidRootPart.Position, game.Workspace.vislbIe.HumanoidRootPart.Position - Vector3.new(0,3,0))
local part = game.Workspace:FindPartOnRay(Ray,game.Workspace.vislbIe)
--[[
(I am not wanting to create the Ray using the same method as this script, I simply wanted to see how this stuff works)
]]--
Now, I want to make a Ray begin on Part, then end at Part1. Here is a script from Roblox Wiki, this script is how I want to make my ray, minus the Tool handle.
local ray = Ray.new(
Weapon.Handle.CFrame.p, -- origin
(mouse.Hit.p - Weapon.Handle.CFrame.p).unit * 500 -- direction
)
local ignore = game.Players.LocalPlayer.Character
local hit, position, normal = Workspace:FindPartOnRay(ray, ignore)
Any solutions?
Screenshot of parts above.

1 comment
9 months later.. I want to thank you very much! I never really understood this until now. Thank you!