Documentation for RaycastResult.Distance is missing

The RaycastResult API reference doesn’t mention the Distance property.

Example usage:

local r = game:GetService"Workspace":Raycast(Vector3.new(0,1,0),Vector3.new(0,-2,0))
print(r and string.format("%.f studs",r.Distance) or "no hit")

The Distance property represents the distance between the origin of the raycast and hit position.

14 Likes

Thanks for your report! We’ve triaged the issue and will follow up when it has been resolved.

2 Likes

This has been added! If you are still experiencing the issue, please allow some time for the changes to propagate.

2 Likes

This topic was automatically closed after 20 hours. New replies are no longer allowed.