This script is supposed to award a badge when you click on a GUI button called "Claim badge" but it doesn't work...
function onClick() player = script.Parent.Parent.Parent.Parent.Parent b = game:GetService("BadgeService") b:AwardBadge(player.userId,167923795) end script.Parent.MouseButton1Click:connect(onClick)
The hierarchy of the GUI is:
Player -- Player Gui ----ScreenGui ------Frame --------TextButton -----------Script
Thanks, MD
How does the GUI appear? When you go past the finish, it pops up or what?