Hello! First of all, I appreciate you guys checking out this article. Anyway, I have been scripting for almost a year, and my business partner and I have been working on a game called" Find the Noobs/ Meme Mall". We have been working on it for a couple of months and we would appreciate a bit of help with our GUI.
“OUR ISSUE”
So we have added a GUI " Badge collector" in our game where it will show the Badge Icons as green when u touch on an object. However, the GUI doesn’t really refresh and shows the icon as green until u Reset
Our Script for BadgeIcon
We would really appreciate any help with this issue because we have been working on this for a couple of months and it hasn’t been completed finished yet. Thanks!
Connect a function to BadgeService.OnBadgeAwarded to see when the player is awarded a badge as well as which badge was awarded. You can then use this information to update the gui of the corresponding badge gui object.
2 Likes
Hmm, I see. is it an attribute?
is it something like this? also I appreciate you for helping!
You use it like this
BadgeService.OnBadgeAwarded:Connect (function (userId, creatorId, badgeId)
print (userId, creatorId, badgeId)
end)
1 Like
BadgeService.OnBadgeAwarded
is locked behind CoreScripts, I believe.
3 Likes
Ah, well that makes things slightly more annoying.
I guess the next best method would be to create a RemoteEvent
and fire it when you award a player a new badge. Send the BadgeId through the event and update the corresponding gui object on the client.
1 Like
@itsLevande @HugeCoolboy2007 Thank you guys so much for the help i really appreciate it!