Hi all. I'm doing a rank system but it stays in the player's rank rutbe system visitors. The script scoreaboard. What is the fault of ?
function ranks()
for _,player in ipairs(getElementsByType("player")) do
local getdatax = getElementData( player,"points" )
if getdatax 1000 then
setElementData(player,"Rank","Novice")
elseif getdatax >= 10000 then
setElementData(player,"Rank","Rookie")
elseif getdatax >= 100000 then
setElementData(player,"Rank","Active")
elseif getdatax >= 1000000 then
setElementData(player,"Rank","Scholar")
elseif getdatax >= 10000000 then
setElementData(player,"Rank","Master")
end
end
end
setTimer(ranks,500,0)