How do I make the guns in my game server sided?

Ello, so I was making a little shooter game, and I was testing it with my friend, he said he was shooting me and I should be dead but he wasn’t holding anything or shooting me, and vise versa.

It’s the exact same on each gun (there are 5) and I was wondering how I made it server sided.


Thanks in advance.


So on the client when the bullet hits you can register it to the server to check if it was hit or not and etc and if it was they can take damage and no damage on the client. This is to prevent lag.

I have no idea what you just said (no offence) and I dont know how to make the guns and bullets appear on server instead of client, so players can take damage.

What I said was a way for you to stop lag while doing this, but to do this on the server just do it when they have the mouse down (you can use UserInputService) depending on how you want to do that and handle the Raycasting and etc on the server.

I have no idea how to do that…

If you are using a free model gun then uh I don’t know what to do for you.

Oh well then I guess im helpless

Raycasting | Documentation - Roblox Creator Hub @Foshizled Good Luck and Adios Amigos!

So uhhh I think I know your issue, Maybe your gun works but since you mentioned he wasnt holding anyhting, Well if you used a Motor6D for your hold anims it probably didnt got replicated to the server and therefore none of you guys shoot, And also you arent even showing the code so how are we even supposed to help you.

1 Like