GetBadgeInfoAsync() isn't working!

Hello! I was trying to get a badge’s info, but came across this error:


Here’s my code:

local badgeId = 6319855491
torso.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local player = game.Players:GetPlayerFromCharacter(hit.Parent)
		local ui_functions = require(game.ServerScriptService.Modules.UI_Functions)
		local badgeService = game:GetService("BadgeService")
		local badgeInfo = badgeService:GetBadgeInfoAsync(badgeId)
		print(player.Name.." has been awarded the "..badgeInfo.Name.." badge! ID: "..badgeId)

Does anyone know a fix?

Line 10 is the print statement

I shortened the code which is why you don’t see end statements

Is the ID of the badge correct? I searched for it and returned with an error page:

1 Like

Your badge id is wrong. The link to your badge would look like this:

If it aint clear

First set of numbers is the experience id and the second set of numbers are the badge ID.

Your ID is looking a lot like the game id. Change that to the real badge id by taking the second set of numbers

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.