How would I secure an FPS game?

I have an FPS game currently. The raycast is on the client and the damage is on the server. How on earth would I secure that?

This tutorial demonstrates how a proper gun using raycasting should be made:

You would fire a RemoteEvent from the client with the position of the client’s mouse to the server, because you can then also calculate the ray on the server.

Thank you! I’ll try it out right now.