Basically, I'm making a Trello ban list using the API.
for i,v in pairs(ap:GetCardsInList(BlackLIST)) do if v.name:match('(.*):(.*)') then local Name,ID=v.name:match('(.*):(.*)') print("Ban List: "..Name,ID) if ID == Plr.userId then warn("Blacklisted User: "..Plr.Name.." | TERMINATED") game.ReplicatedStorage.TrelloDataRequest:FireClient(Plr,"BlackLIST") BansList = true end end end
Everything works, except "if ID == Plr.userId then"
The ID is the exact same as the Plr.userId - but for some reason it won't work.
Help?
Because ID
is a string type, and Plr.userId
is a number type, you need to ensure that they're both the same type, otherwise they are not considered equal.
if tostring(ID) == tostring(Plr.userId) then
The code above should work correctly.