Raycast gun problem

When posting code on the forum, don’t post an image of the code, just paste it directly into the thread using Code Tags .

When you create the direction Vector by adding the spread, you don’t turn the spread values to face the same way as the camera.