My script is supposed to change your health and maxhealth based on how high your level is, however it doesnt do anything when I spawn in the game
local function onPlayerAdded(player)
player.CharacterAdded:Connect(function(character)
character.Humanoid.MaxHealth = player.leaderstats.Level * 20
character.Humanoid.Health = player.leaderstats.Level * 20
end)
end
An explanation on why it doesnt work would be helpful as I am a noob at scripting

1 comment
I did the changes and nothing happens but I am pretty sure this was part of the problem