So, I'm trying to set the humanoid's health so that whenever they die, their health is kept the same. And because it's activated after clicking a textbutton, I'm trying to activate the :LoadCharacter() event. However, its health is reverted back to 100. Below is only a portion. WalkSpeed and JumpPower are fine.
game.Players.PlayerAdded:connect(function(player)
player.CanLoadCharacterAppearance = false
player.CharacterAdded:connect(function(char)
local humanoid = char:FindFirstChild("Humanoid")
player.PlayerGui.Classes.Main.Class1.MouseButton1Click:connect(function()
print("Class 1 picked")
class1 = true
class2 = false
class3 = false
class4 = false
class5 = false
class6 = false
class7 = false
class8 = false
class9 = false
if class1 and class2 == false and class3 == false and class4 == false and class5 == false and class6 == false and class7 == false and class8 == false and class9 == false then
print("Walkspeed and health altered")
humanoid.WalkSpeed = 22
humanoid.MaxHealth = 125
humanoid.Health = 125
humanoid.JumpPower = 60
player:LoadCharacter()
end
end)

4 comments
Maybe add a wait() after maxhealth
Hm, still doesn't work.
So, apparently, a few people have also been complaining about this. Lucky it's not just me.
Derp, had to rearrange some things.