Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Explanation of Ray.new please?

What does Ray.new mean?

1 answer

✓ Accepted answer

'Ray' is the globally-accessible (by default) variable for accessing the constructor for Ray objects, much like 'Instance' is for physical objects.

Ray.new(vec3Origin, vec3Direction) is the constructor for a Ray object, which is really just a line segment. It is used in the raycasting functions for detecting if the line created intersects any Part object.

This discussion is preserved as it was. New answers, comments, and votes are closed.