Hi everyone,
I’m building a Stat System where players earn points upon leveling up to increase their attributes. One of these attributes is Health, which is supposed to increase MaxHealth by 5 points per stat level.
The Issue:
When I upgrade my health, the UI correctly shows the MaxHealth increasing (e.g., from 100 to 200). However, as soon as an NPC hits me for 10 damage, my health immediately drops to 90/100 instead of 190/200. It seems like the server doesn't "know" about the MaxHealth change, so it forces my health back to the default 100 limit.
I am using a custom HUD and a Stat System. I’ve tried changing the MaxHealth, but it keeps resetting or not replicating to the server correctly. When I’m at 200 MaxHealth on my screen and get hit, the health bar suddenly snaps to half-full because the server thinks my max is still 100.
What I need help with:
How can I properly update a player's MaxHealth from a Stat System so the server recognizes the change and doesn't reset it to 100 when damage is taken?
Thanks for the help!