How to have level be based off stat

My RPG is based around stats. Example: Melee, Defense, Magic, Etc.
And i want the level to based off the stat’s levels

then make the level be based off the stat’s levels.

thanks alot for the help man :neutral_face:

Store the experience as a number, then calculate the level based off that number.

A simple formula is so:

function levelFromExp(x)
  return x // 100
end

Super simple - every 100 experience = 1 additional level. Modify to your heart’s content.