Badge error, players don't receive the badge

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I added a script that gives to a certain player a badge and a random tool when he get 12/12 eggs.
  2. What is the issue? Include screenshots / videos if possible!
    When the player hit 12 eggs, they don’t receive the badge.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes, but I didn’t found much information.

Script when player get 12 eggs send a Remote event (Local script → Server)

if #eggsFound == #eggs then
			
			game.ReplicatedStorage.OnAllEggsFound:FireServer()	

Badge script (not a local script)

game.ReplicatedStorage.OnAllEggsFound.OnServerEvent:Connect(function(plr)








	plr:WaitForChild("PlayerGui"):WaitForChild("BadgeService"):AwardBadge(plr.UserId, 3748402732808653)


local folder = game.ServerStorage.randomitem

	
	local items = folder:GetChildren()
	local randomItem = items[math.random(1, #items)]

	
	local newItem = randomItem:Clone()
	newItem.Parent = plr.Backpack
end)
5 Likes

The only error I got is that:

2 Likes

game:GetService(“BadgeService”):AwardBadge(plr.UserId, 3748402732808653)

3 Likes

Well, you fixed the error, but I still don’t get the badge.
Is a problem if I am testing in Studio?

2 Likes

Yes, Studio doesn’t award badges any longer so you will need to test it in a real server.

2 Likes

What do you mean? Badges work for me in Studio. (atleast until now)

I believe it still works when testing with TeamTest but not in Solo.

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