Hello this is my first time using devforum to report a bug, I’m having a problem getting a bedge created in my Roblox group (I’m the owner and I paid for it) to work in the script, it’s functional and has been tested in experience outside of group, in this case I want the player to receive the emblem when entering the game, something simple to do but even though the script is correct the badge does not appear in the game and in the player’s inventory, I have tried to correct it in several ways but I was unable to resolve it. Opening support I didn’t get an effective response.
Here is the game group where I created the emblem and experience :
And this is the script the user receives when they touch a part: ```local BadgeService = game:GetService(“BadgeService”)
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("Emblema concedido com sucesso para " .. player.Name .. "!")
else
print("Emblema não foi concedido para " .. player.Name .. ": " .. errorMessage)
end
end
Hello, I soon intend to post more details about the error I found, but in short, I am unable to make the user receive the emblem when entering the game or stepping on any part of it From the game, the game is being created in this group above, but I tested the same script in a game on my personal account (not in the group) and it worked, the error is in the group emblem itself, that’s what I have Sure, but I don’t know what to do to make the bedge created in the group game work.
function is triggered when the object this script is attached to is touched by another object. If this object is a player (i.e. player is not null), the BadgeService service will attempt to grant the em
What is printed into output when the badge is awarded? Does your print message for the success or failure run? Also, are you doing this from a Script or LocalScript?
Also, you should make sure that the function is actually being called correctly when the part is touched. Such as:
part.Touched:Connect(function(other)
-- your code here
end)
It is printed that “player successfully received emblem” but the badge does not appear on the player’s screen or in the inventory. I tested with the emblem two different ways of granting the emblem: when entering the game and just touch a specific part (both work in my games outside the group, but in the group game it doesn’t work)
I don’t think it’s that, but it’s worth a try tomorrow I’ll do it and I’ll bring more news and detail the error in more detail, I heard that it may be related to some configuration of my group itself but No solution, but tomorrow I’ll come with more images and news.
How do I convert? Can you tell me if there will be any difference in making the badge work in a game on your own account versus in a game in a group with more collaborators?
He was asking if you could use tostring() to convert the badge id into a string and try that. But no, it wouldn’t work, as AwardBadge() requires the badge id to be a number.
And as for your second question, it depends. Collaborators are easier to manage with a group, but you can still do that if the game is owned by your account. It honestly depends on the size of the project and your preference.