when I try to print out the Origin and Direction of the ray it errors out saying:
1 | 18 : 41 : 00.464 'Origin' is not a valid member of RaycastResult - Server - Script: 4 |
1 | wait( 3 ) |
2 | local rayResult = workspace:Raycast(Vector 3. new( 0 , 1 , 0 ), Vector 3. new( 0 , 0 , 100 )) |
3 | if rayResult then |
4 | print (rayResult.Origin) |
5 | print (rayResult.Direction) |
6 | end |
workspace:Raycast returns a RaycastResult value. You can find the properties of RaycastResult at developer.roblox.com/en-us/api-reference/datatype/RaycastResult