Hellooooo, heres another post on something that I know is simple but can’t figure out for some reason! What I am doing is having a leaderstats script that has a “Health” stat… Later I will add a buyable thing that allows the player to buy more health, the health that the player buys will be added to the Health stat, which is connected to the players actual health. What I’m now having trouble with is making it so that the players max health becomes the value of the health stat whenever it goes up… if that makes sense.
I tried making a few scripts, but I think my problem is identifying the humanoid?
If anyone can help pleasee do! I feel like Ive done a bad job explaining also as a lot of repetitive wording so if you dont understand please ask ill try to explain more lol.
Edit: The script above is a script i tried a few times in a normal server script in workspace, gives me an error saying humanoid isnt valid.
Make an Event using Player.CharacterAdded,which gives you the character when they spawn in.
From that event, grab the Character, and look for the Humanoid, when found use the HealthChanged Event located in the Humanoid.
Because you are not putting it in right place, you are supposed to Apply the Change within the HealthChanged Event, Otherwise it will just be applied everytime the Player Respawns