Badges are rewards you design and award to players in your Roblox game

A badge in Roblox is a digital achievement that you create and award to players who complete specific tasks in your game. Unlike cosmetic items or currency, badges are tied to your game's logic — you decide what triggers them, what they look like, and when players earn them. A player might earn a badge for reaching a certain level, defeating a boss, collecting hidden items, or playing for a set amount of time.

Badges live in a player's profile permanently and show other players what they have accomplished in your game. You create and manage badges through Roblox Studio, the free development environment where you build your game. The process involves three steps: designing the badge image, creating it in the Roblox website, and writing code in Studio that awards it when conditions are met.

You do not need to pay anything to create badges, and they work in any game you own. The main limitation is that you can create up to 100 badges per game, which is enough for most projects.

Key Takeaways

  • Badges are created on the Roblox website under your game's settings, not inside Studio, and require a 512×512 pixel image file.
  • Once you create a badge on the website, you reference it by its ID number in a Lua script inside Studio to award it to players.
  • The script uses the BadgeService to check if a player has earned the badge and awards it only once, even if the condition is met multiple times.
  • Test your badge in Studio using the Run button before publishing your game, because badges awarded in test mode do not count toward real player profiles.

Prepare your badge image before you create it on the website

Roblox badges must be square images, 512 pixels by 512 pixels, in PNG or JPG format. The image should be straightforward enough to read at small sizes, because players will see it as a small icon on their profile. Use a graphics program like Photoshop, GIMP (free), or even Canva to create or edit your image. Make sure the file size is under 1 MB, though most badge images are much smaller.

Design the badge to match your game's style and the achievement it represents. If your game is a racing game and the badge is for winning 10 races, use a checkered flag or trophy. If it is for exploring a hidden area, use a map or compass. The clearer the connection between the image and the achievement, the more meaningful the badge feels to players.

Save the image file to a folder on your computer where you can find it easily. You will upload this file to the Roblox website in the next step.

Create the badge on the Roblox website

Log into your Roblox account on the website and go to your game's settings. Click Monetization in the left menu, then select Badges. Click the button to create a new badge. You will see a form with fields for the badge name, description, and image.

Enter a name that describes the achievement — for example, "First Win" or "Explorer's Discovery". Write a short description that explains what players must do to earn it. This description appears when players hover over the badge on their profile. Click the upload button and select the image file you prepared. Once you upload the image, Roblox will show you a preview. If it looks correct, click Save.

After you save, Roblox assigns the badge a unique ID number. You will see this number on the badge's page. Copy this number and paste it into a text file — you will need it when you write the code in Studio.

Write the script in Studio that awards the badge

Open your game in Roblox Studio. You need to write a script that runs when the condition for earning the badge is met. For example, if the badge is for reaching level 10, the script runs when a player's level reaches 10. If the badge is for collecting a hidden item, the script runs when a player touches that item.

The script uses the BadgeService, which is Roblox's system for managing badges. Here is a basic example that awards a badge when a player touches a part:

local BadgeService = game:GetService("BadgeService") local badgeId = 2124640404 -- Replace with your badge ID script.Parent.Touched:Connect(function(hit)   local humanoid = hit.Parent:FindFirstChild("Humanoid")   if humanoid then     local player = game.Players:GetPlayerFromCharacter(hit.Parent)     if player then       BadgeService:AwardBadge(player.UserId, badgeId)     end   end end)

Replace 2124640404 with your actual badge ID. Place this script inside the part that triggers the badge — if it is a hidden item, put the script inside that item's model. The script checks that the thing touching the part is a player character, then awards the badge to that player.

Use pcall to prevent errors from stopping your game

If the BadgeService fails for any reason — network lag, a temporary outage, or a typo in the badge ID — your script will crash and stop running. To prevent this, wrap the badge award in a pcall, which stands for "protected call". A pcall runs code and catches errors without stopping the rest of your game.

local BadgeService = game:GetService("BadgeService") local badgeId = 2124640404 script.Parent.Touched:Connect(function(hit)   local humanoid = hit.Parent:FindFirstChild("Humanoid")   if humanoid then     local player = game.Players:GetPlayerFromCharacter(hit.Parent)     if player then       local success, err = pcall(function()         BadgeService:AwardBadge(player.UserId, badgeId)       end)       if not success then         print("Badge award failed: " .. err)       end     end   end end)

This version prints an error message to the Output window if something goes wrong, so you can debug it. The game keeps running even if the badge fails to award.

Test badges in Studio before publishing your game

Click the Run button in Studio to test your game. Navigate to the part or condition that should award the badge. If the badge awards correctly, you will see a notification on your screen. Check the Output window for any error messages.

Important: badges awarded while you are testing in Studio do not count toward your real player profile. This is intentional — it prevents developers from testing badges on live players. Once you publish your game and a real player earns the badge, it will appear on their profile permanently.

If the badge does not award, check three things: the badge ID is correct and matches the one from the website, the script is inside the correct part or object, and the condition that triggers the script is actually being met. Use print statements in your code to confirm the script is running.

Award badges based on game events and player progress

Badges work best when they reward specific, meaningful achievements. Common examples include reaching a score threshold, completing a level, defeating a boss, collecting all items in a level, or playing for a certain amount of time. You can also award badges for social achievements like inviting friends or playing with other players.

To award a badge when a player reaches a score, store their score in a variable and check it whenever the score changes. To award a badge after a time delay, use the wait() function to pause the script for a number of seconds, then award the badge. To award a badge for collecting items, increment a counter each time a player touches an item, and award the badge when the counter reaches the target number.

The key principle is that the script should award the badge only once per player, even if the condition is met multiple times. The BadgeService handles this automatically — if a player already has the badge, calling AwardBadge again does nothing. This means you do not need to write extra code to check whether a player already has the badge.

Frequently Asked Questions

Can I change a badge after I create it?

You can change the badge's name and description on the Roblox website at any time, but you cannot change the image. If you need a different image, delete the badge and create a new one with a new ID. Any players who earned the old badge will keep it on their profile.

What happens if I use the wrong badge ID in my script?

If the badge ID does not exist or belongs to a different game, the BadgeService will fail silently — the badge will not award, but your game will not crash if you use pcall. Check the Output window for error messages and verify the ID matches the one on the Roblox website.

Can players see how many people have earned a badge?

Yes. When a player views a badge on their profile, they can see how many other players in the game have earned it. This encourages players to pursue badges that are rare or difficult.

Do I need to do anything special to award badges to multiple players at once?

No. Each player earns the badge independently through the same script. If 100 players touch the part that awards a badge, all 100 will earn it as long as they meet any other conditions in your script.

Can I award a badge through a GUI button or command?

Yes. Instead of using Touched, use a Button's MouseButton1Click event or a chat command. The BadgeService code stays the same — you just change what triggers it. For example, a button in a shop could award a badge when clicked, or a command like "/claimreward" could award a badge when typed.