I made stats like stamina, mana, etc. the max stamina and max mana worked perfectly, whenever you added a stat point, the max went up, but for some reason, It doesn't change the humanoid's max health, it doesn't show any errors or anything, it just does nothing to the humanoid health.
Script:
local player = game.Players.LocalPlayer
local health = player:WaitForChild("Stats"):WaitForChild("Health")
local playerhealth = player.Character:WaitForChild("Humanoid").Health
local maxhealth = player.Character:WaitForChild("Humanoid").MaxHealth
local stats = player:WaitForChild("Stats")
local expmax = stats:WaitForChild("ExpMax")
local level = stats:WaitForChild("Level")
local stamina = stats:WaitForChild("Stamina")
local maxstam = stats:WaitForChild("MaxStam")
local stamstat = stats:WaitForChild("StaminaStat")
local durability = stats:WaitForChild("Durability")
local magic = stats:WaitForChild("Magic")
local maxmana = stats:WaitForChild("MaxMana")
while wait(0.01) do
health.Value = playerhealth
expmax.Value = level.Value * 100
maxstam.Value = stamstat.Value*2 + 100
maxmana.Value = magic.Value*2 + 100
maxhealth = durability.Value*2 + 100
end
I've tried simply putting the durability part in another script, but it still does the same thing, if you have any idea what's wrong, please let me know, because I need this to work for my friends game. Once again, it doesn't show any errors, warnings, etc. so I have no clue where to start.

6 comments
oh on the maxstam.Value = stamstat.Value2 it's supposed to say * 2 it acidently changed the text.
Put your code inside a code block. Edit this post, click on the blue Lua icon and two lines of "~~~" will appear. Put your code in between these.
How do I edit the post, sorry it's my first time here.
wait nevermind, figured it out
You cannot use LocalPlayer in a Script. This is client side only.
This is a local script inside of starter player scripts, and the thing is, everything in this script works, except the max health change.