Can't detect what the part's name is, in the raycast?
My Raycast won't detect what the part's Name is ? - If that makes sense.
01 | local basePlate = game.Workspace.basePlate |
03 | local rayOrigin = game.Workspace.Part.Position |
05 | local rayDirection = Vector 3. new( 0 , 30 , 0 ) |
08 | local raycastParams = RaycastParams.new() |
10 | raycastParams.FilterDescendantsInstances = { basePlate } |
11 | raycastParams.FilterType = Enum.RaycastFilterType.Blacklist |
13 | local raycastResults = workspace:Raycast(rayOrigin, rayDirection, raycastParams) |
18 | local hit = raycastResults.Instance |
The error code that i'm getting : attempt to index nil with 'Instance'