How to make a Mounted Sniper

Im making a squid game inspired game and one thing i want to recreate is the snipers that the guards use, from what i remember they are mounted. Im trying to make it so that the sniper follows the players mouse/first person camera for mobile and when clicked it shoots not a projectile but a raycast in the direction of the players mouse/tap. also when scoped you know it works like a sniper. I would then just client render the projectile because projectiles just lag the game for me. I know how to script other things just i never scripted a gun before lol. Can anyone give me tips on how to do this?

I kept saying firecast it’s called fast cast I’m not editing out every instance of the word so just know

For positioning the gun you can just use look at to position to look at mouse hit position. For rendering projectiles I have specifically had the issue you mentioned where it doesn’t lag but there’s a noticeable delay from client telling server to send the projectile to the server actually doing so. In my game I have the client render it using firecast module and that gets rid of the delay however the obvious downside is that only the client can see the projectile and that accordingly the client has to be the one detecting hits which means it has to tell the server when it does hit which in turn means very easy to exploit. My games single player so for me none of that is of concern however in your case I would still probably do it on the server even with the downside of the delay.

Snipers don’t fire lots of bullets per minute so a few fire cast projectiles shouldn’t lag your game.

If however you want to use ray casts you can search up how to cast a ray to mouse hit because doing so is also easy.

ill look into that then, the only thing im having issues is the camera part as the model moves too, the camera kinda just stutters movement and skips and stuff so its just a bit complicated.