What do you want to achieve?
I’m making a part that when you click it, it awards the player a badge.
What is the issue?
I am getting this error in the output:
What solutions have you tried so far?
I have checked the Id of the badge to make sure I copied it correctly and I don’t think there’s
anything wrong with the script.
Script:
local badgeId = 2124496454
local badgeServ = game:GetService("BadgeService")
local function Activated(player)
if player.PlayerGui.NoobFind.Frame.NoobCount.Text == "5" then
badgeServ:AwardBadge(player.UserId, badgeId)
end
That’s what I thought.
I’ve noticed that if I paste the badge Id on a shirt accessory page, it comes to this game:
I’m not sure if some ids are supposed to be the same but this is the only thing I can think of as to why it has that error.
Not related to your issue, but if you’re changing the text via local script, server won’t see the changes and consequently this if statement wouldn’t get passed.
Edit: I’m only assuming you’re changing the text via local script, if not, then just forget everything I said.