game.Players.PlayerAdded:Connect(function(plr)
local Endurance = plr:WaitForChild("leaderstats").Endurance
local Character = plr.Character or plr.CharacterAdded:wait()
Character.Humanoid.MaxHealth = 100 + Endurance.Value
Character.Humanoid.Health = 100 + Endurance.Value
Endurance.Changed:Connect(function()
local Character = plr.Character or plr.CharacterAdded:wait()
Character.Humanoid.MaxHealth = 100 + Endurance.Value
end)
end)
So This Script Does Work Correctly, It Does Scale My Endurance Value With My Health, But Instead On Game Join It Starts With The Old Default Maximum Instead Of The New One, So Then The Players Health Is Really Low, Can Anyone Fix This?

1 comment
Make sure the MaxHealth is changed first before changing the health. You could do Health = Health + Endurance.Value.