So I have a script that is placed in a gear inside ReplicatedStorage, when the player has it in their inventory, they should receive a badge, however, it does not work. Help please.
if (script.Parent.Parent.Parent:FindFirstChild("Humanoid")) then
print "lol"
p = script.Parent.Parent.Parent
if (p ~= nil) then
print("Awarding BadgeID: " ..script.Parent.BadgeID.Value .. " to UserID: " .. p.userId)
local b = game:GetService("BadgeService")
b:AwardBadge(p.userId, script.Parent.BadgeID.Value)
end
end
Thanks.
