My script isn't returning percentage?
Im trying to make a game that you need exp to level up and I want to get the percent of how much exp they have. I put this line of code in part of my script but i keep ending up with -nan(ind)
01 | local xp = player:WaitForChild( "plrInfo" ):WaitForChild( "EXP" ) |
02 | local xpneeded = player:WaitForChild( "plrInfo" ):WaitForChild( "XPNeeded" ) |
04 | local percentage 1 = xp.Value/xpneeded.Value |
06 | local percentage 2 = percentage 1 * 100 |
08 | local percentage 3 = math.floor(percentage 2 ) |
11 | label.Text = percentage 3.. "%" |