Having trouble with awarding badges

So I’m kind of new to coding so theres probably an obvious answer but tutorials and chatgpt aren’t helping me at all. So the code is supposed to check if the text of a gui (hs) is over 4.5 and awarding a badge if it is. I’m probably just missing a variable for “player” or something but I don’t really know how to fix it.

local hs = script.Parent.Parent.hs

if tonumber(hs.Text) > (4.5) then
game:GetService(“BadgeService”):AwardBadge(player.UserId, 2604129521784148)
end

1 Like

I recommend reading up on BadgeService to get the most out if what you are wanting to do with your badge(s).

Also not sure if you have seen this Tutorial, but I recommend it for making a custom badge.

Back to the point! The one thing to know about badges is that they can only be given on the Server side(Server Script), not the Client side(Local Script).

Thats probably it as I was doing all my coding in local scripts. Thank you!

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