Yes! Maybe I didn’t look in the right place.
the script takes all the badges of the flags (find the flags game) and puts it in an organized manner in the gui and also sees if they have it which uses the badgeservice because a badge would be granted to them if they collected dont have it. also it needs to check which badges it have to make the backround in the gui green. screenshots below for reference
So on the client-side, you need a UI that show the user all the badges he got?
yes, that is basically all it does
edit: also there is a local script for when the player touches a hitbox of a flag it checks if he has a flag or not, if he does it will show up like this
and if they dont it will say congrats along with awarding them the badge
So, as for
You actually don’t need to check if the user has the badge, if you put your AwardBadge
code into a pcall
it will allow you to avoid the error if the user already have the badge. You could even handle it if you need to do something with it.
As for the problem with the rate limit, there is multiples approach, to name only a few. You could simply add a wait(1)
and hope for it to fix the issue. You could also load badges by batch, by setting up a for
or while
loop waiting 1 minute before starting the next batch.
As a side note, there is a lot of others approach that would require starting from scrach by using remoteFunction
or remoteEvent
to do client-server interaction.
You should probably store all the badges a user has when he join the game inside a table, make a remoteFunction
that check if the user have the badge in the stored table so that one of your client-side script could ask the server and get a response.
problem is i dont know how to do all this so idk what im going to do but i will try to learn how
Roblox Docs can be quite use full
where would i add this in the script
In the loop where UserHasBadgesAsync
is used.
You will probaly need to load them by batch then / try using wait(0.5)
yeah but i might try the pcall thing but i dont really understand it
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.