My issue is the topic name. raycasting is constantly resulting in nil in the output. can someone tell me whats wrong and how to fix it?

My issue is the topic name. raycasting is constantly resulting in nil in the output. can someone tell me whats wrong and how to fix it?
Nothing wrong. If it’s nil, the ray simply did not hit anything (the player could be aiming at the sky or something). Make sure you use an if statement to check if the ray has hit something.
The thing is I was clicking at the wall or the dummies I placed. And for the If statement what would I do? If it doesnt hit something what would it do?
I just did a test and it seems the ray is extremely off from where you click. What can to fix that?
Try using Mouse.UnitRay.Direction instead.
Not on the server script, it has to be in the local script.
Is there any way to fix it? I dont know what else to do