Health changes locally and replication to the server

im getting mixed information so

If I were to add or subtract health from the player on their side (client), would it replicate to the server?

I’m getting people saying no, some say yes, some say only subtracting health but not adding…

1 Like

No, you can’t do it locally. The player would see the changes but they wont get replicated to the server.

2 Likes

If I were to add or subtract health from the player on their side (client), would it replicate to the server?

No.

I’m getting people saying no, some say yes, some say only subtracting health but not adding…

No, health is not replicated to the server if changed on the client-side (nor MaxHealth).

The only way to make sure is to actually test it yourself instead of asking a lot of players, which have different opinions with no testing.

3 Likes

It would not automatically replicate, nor should you manually replicate it to the server.

If you allow the client to set it’s own health exploiters will just give themselves infinite health.

The server should always take care of validating things. (validating things on the client is essentially useless against exploiters)

1 Like

Those people aren’t good at scripting if they say yes.

You can’t do anything on the client to replicate to the server.

1 Like