#I can't get this script to proceeds if a player has multiple badge required

1 messages · Page 1 of 1 (latest)

south onyx
#

What am I'm doing wrong?

topaz tulip
# south onyx What am I'm doing wrong?

Please learn how to format your code. Also, currently it just loops once, then it sees a return statement and exits the function. I’m guessing that you want to check if the player has all badges, right?

south onyx
#

yes I do

topaz tulip
#

Well, an easy way to make it independent of the amount of badges would just be to remove the return HasBadge and return false. And replace those with table inserts. Then just loop through the new table:

for _, bool in newTable do
if bool then continue end
return false
end
return true

tender lotus
#

userhasbadgesasync, lets you check up to 10 at once. maybe check out the docs for that

south onyx
#

alright