Why doesnt raycast work after a bit?

Also, thanks for replying. It was kinda hard to find someone that will help. I will just write a normal gun script, then connect it to a bindable event.’

(Forgot to say this; my code works now, but I might still rewrite it.