Error granting badge to in-game users in my party

Hello again I’m here to explain and ask for the help of you more experienced in creating games on the platform, to solve a problem I’m having when trying to grant an emblem to the user in all the ways I need, such as when he enters the game or steps on a specific part could you help?

Well, I’ll start by talking about the group I’m producing the game with, and this one:

It’s in this group that we’re making the game, and I’ll post all the badges I’ve tried to grant to users through the script:


Detail all are active and functional according to test scripts to see if the badge is functional across the console, and I’ll send you some of the script code that I tested and worked in my games outside the group but on my personal account:


Here it shows that in the direct game on my account the script works.
Meanwhile, in the game made in my group, it says that the bedge is functional and that it was successfully granted, but the user does not receive it in the inventory and does not even appear on the player’s screen (the element ID is correct and it is active)

Anyone who can help me would be grateful and I’m sure the error is not occurring in the script and I have all the permissions to my group since I paid it and created it but I came across this:


I don’t know if it can have anything to do with this new option but I thank anyone who can help me and thank you very much. :hugs:

Does the group own the badges you are giving? If not, the script won’t work. As shown in this image, you own the badges:


Make sure you create the badges under the group.

Yes It disponible and active:


Are you trying to give a player a badge or are you trying to check what badges a player has.

Simple, I’m trying to give the user an emblem when he steps on the part that appears in the photo and if it’s functional he gets the badge and if not it’s said he doesn’t get it but the script says it’s functional but the badge doesn’t fall on the player’s account

Could you provide us with the part of the script that’s not working? Maybe there’s something you´re not considering.

Is the script working through a conditional?
Is it a local script?

local badgeid = 1234578
local playerid = 54321
local badgeservice = game:GetService("BadgeService")

--whoops
if not badgeservice:UserHasBadgeAsync(playerid, badgeid) then
	print("badge awarded to player")
	badgeservice:AwardBadge(playerid, badgeid)
else
	print("user has badge!!")
end
1 Like

`local Players = game:GetService(“Players”)

local badgeId = 3639477158844045 – Substitua pelo ID do emblema que você deseja conceder

local function onTouched(other)
local character = other.Parent
local player = Players:GetPlayerFromCharacter(character)

if player then
	local success, errorMessage = pcall(function()
		BadgeService:AwardBadge(player.UserId, badgeId)
	end)

	if success then
		print("Badge has been awarded to " .. player.Name .. "!")
	else
		print("Badge has not been awarded to " .. player.Name .. ": " .. errorMessage)
	end
end

end

script.Parent.Touched:Connect(onTouched)Preformatted text`

here it the script but he’s functional in the out-of-group game that I didn’t even show in the photos