I have a Domino Crown part where I want it to work as when you touch it (walk through the part) you will get the badge. I do not know how to script but I got the Badge reward script and I tried using a LocalScript and a normal Script but neither work. This exact script worked in 2020.
The Script:
local BadgeService = game:GetService("BadgeService")
local id = 2124730002 -- My Badge ID
local badgegive = game.Workspace.DominoCrown -- "DominoCrown" is name of the Part
badgegive.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not BadgeService:UserHasBadgeAsync(plr.UserId, id) then
BadgeService:AwardBage(plr.UserId, id)
end
end
end)