Im trying to make a group rank system but I want my code to look nice. Problem is when I try to set it so if your a certain rank you'll get a certain morph I have to do 1 and 2 and 3 and 4 which is just redundant. And it would require me to write numbers like 30 times between gaps of permissions. Any other way?
player = game.Players.LocalPlayer Group = player:GetRankInGroup(889994) if player:GetRankInGroup(889994) == 1-3 then print("Hey") end
There ^ I was trying to select 1 to 3 My other way
player = game.Players.LocalPlayer Group = player:GetRankInGroup(889994) if player:GetRankInGroup(889994) == 1 and 2 and 3 and 4 and 5 then print("Hey") end
Yes!
You can create a table with those numbers, seperated by a ,
and use in pairs to do what you want!
local numbers = {1, 2, 3, 4, 5} for _,v in pairs(numbers) do player = game.Players.LocalPlayer Group = player:GetRankInGroup(889994) if player:GetRankInGroup(889994) == v then print("Hey") end end