Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you find the Position of the Collision in the path of a ray?

Asked by 8 years ago

I made this into a tool:

script.Parent.RayMaker.Changed:connect(function()
    local ray = Ray.new(script.Parent.RayMaker.Position,script.Parent.RayMaker.CFrame.lookVector*500)
    local hit, position = workspace:FindPartOnRay(ray)
    print (position)
end)

But so far it's not outputting anything.

0
Use variables for your ray vector3's so we can actually see your code. GoldenPhysics 474 — 8y

Answer this question