Hey, so today I uploaded some new badges for my game and one of the badges would just be touching an object and you’ll receive it. So I used the classic badge giver script that Roblox would give you when you first uploaded a badge, However this does not work anymore. It’s been years uploading a badge and I’m just curious if anything changed or not, I’ll leave the script down below if anyone wants to just correct it for me or tell me what to do that’d be great. Thanks.
`print("Badge Awarder Loaded. BadgeID: " .. script.Parent.BadgeID.Value)```
function OnTouch(part)
if (part.Parent:FindFirstChild("Humanoid") ~= nil) then
local p = game.Players:GetPlayerFromCharacter(part.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
end