I recently learned about raycasting, but I can't do such a simple algorithm. Consider the situation and the script:
(Three aligned parts in Workspace:
1 - script.Parent, ray start
2
3 - game.Workspace.3, ray end )
-- Script
Destiny = game.Workspace: WaitForChild ("3")
NewRay = Ray.new (script.Parent.Position, Destiny.Position)
FirstPart = game.Workspace: FindPartOnRay (NewRay)
if FirstPart then print (FirstPart.Name) end
The "FindPartOnRay" function, however, does not even detect the source part of ray itself. What's wrong with the script?
