#Managing ammo

1 messages · Page 1 of 1 (latest)

dreamy smelt
#

Ive been making guns, but im confused on how i should keep track of the bullets of multiple weapons, how would i do that? If i use attributes on number values, cant hackers tamper with those?

orchid light
#

No hackers can't tamper

#

They can only tamper with the values on there own computer but it won't effect the server

dreamy smelt
#

Wait youre saying i should manage ammo on the server?

#

Oh by ammo i meant like the magazine of the gun

#

Like how much ammo the player had left to shoot before they need to reload

orchid light
#

If it's managed on the client then it can be tampered

#

Everything can be tampered on the client side

#

Not only attributes

#

They could delete your gun localscript and replace it with there own gun localscript

dreamy smelt
#

Oh no

#

I have everything being handled on the client except for damaging other players

orchid light
#

Maybe the server can only allow you to damage players after a debouce

#

Guns are very easy to hack In multiplayer games

#

Because we rely on the client for accurate information

mossy viper
mossy viper
dreamy smelt
#

So do i use remote events every time the player wants to fire and manage ammo on server side?

mossy viper
#

I recommended to do check on both side, if gun has no ammo then client shouldn't fire event to reduce ping lag, even they fire event using exploit, server will still sanity check if it's eligible for firing the gun

dreamy smelt
#

Ah alright thanks

mossy viper
#

There more optimization you can made.

dreamy smelt
mossy viper
#

Too complicated

#

Why not handle fire on server?

dreamy smelt
#

so i send the raycast information to the server?

mossy viper
#

Wdym client perform action?

dreamy smelt
mossy viper
#

If client perform it, then other client won't see the bullet

dreamy smelt
#

yeah if client laggy tho the bullets will feel delayed

mossy viper
#

If you making fire event