Help with checking rank system

Yes but I don’t think you need to do that. This script should get the number of the rank that you want which can be used to tell if the player has permission to use a specific command

Make sure the function is bellow the table

Oh wait I believe I did it wrong again hold up one second I’m so sorry

1 Like

No no no it is fine :grinning_face_with_smiling_eyes: It is a normal human reaction

Is the error at the first for loop or the second?

image image

I chnaged it to this:
image
Is that fine?

ok I just wasnt thinking right lol. replace the [p] with [i]

image
image

yeah that is fine it should still work the same (if i can code it right lol)

delete that if statement and replace it with this:

for n, _ in pairs(allowedRanks) do
	if allowedRanks[n] == rankName then
		if i <= n then
			return true
		end
	end
end
1 Like

Also would this work
image
and I change all the code to this?

1 Like

like this:
image

1 Like

I think that should work if you change that

1 Like

How Would I change it? :grinning_face_with_smiling_eyes:

Yes just like that I hope it works now

Im confused on what you mean by this

1 Like

image
It is comparing a string with a number…
image

1 Like

How Would I change this?

To make it work

This is the error i get :grinning_face_with_smiling_eyes: ( •̀ ω •́ )✧( •̀ ω •́ )✧