This level script is suppose to set the player's Health to be 10 times the level they are. So, level 2 will be 120 health. Why wont it work? I'm not getting any errors, but I have used Print, and I detailed what is printing and what isn't
script:
s = script.Parent
p = s.Parent
c = p.Character
p.Levelss.XP.Changed:connect(function()
if p.Levelss.XP.Value >= p.Levelss.Level.Value * 20 then
p.Levelss.XP.Value = 0
p.Levelss.Level.Value = p.Levelss.Level.Value + 1
p.Character.Humanoid.MaxHealth = p.Character.Humanoid.MaxHealth + 10
p.Character.Humanoid.Health = p.Character.Humanoid.Health + 10
p.Levelss.FAP.Value = p.Levelss.FAP.Value + 1
end
end)
function onPlayerEntered(newPlayer) print("Added New") --wont print
newPlayer.CharacterAdded:connect(function(c) print("Connected Character Added") -- wont print
c.Humanoid.MaxHealth = newPlayer.Levelss.Level.Value * 10 + 100 print("Max HP set") --wont print
c.Humanoid.Health = newPlayer.Levelss.Level.Value * 10 + 100 print ("Health set") --wont print
end) print ("ended 1") -- wont print
end print ("ended 2") -- Prints
game.Players.PlayerAdded:connect(onPlayerEntered) print("Connected Function") -- Prints

5 comments
Indent your code, then we'll try and fix it lol.
yes, because a 26 line script needs to be indented.. Alright, I will go indent it
There ya go
Is this a LocalScript or a Script?
No, it's a normal script inside of the starter pack