Let’s list it up:
- Method of firing projectiles - rays or physical projectiles
- Method of dealing damage
- Server or client-side, preferably server
Mapping the base:
- Client fires the gun.
- Server checks if it can fire or not depending on tool’s parent, player’s health etc.
- Server either fires a projectile/ray after condition is met or does something else.
CAUTION! Physical projectiles will lag if not done correctly. FastCast is an option of firing the projectiles.