Touch part to receive a badge not working

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)

Was this a mistypo?

            BadgeService:AwardBadge(plr.UserId, id)
2 Likes

Just noticed that, I don’t script and know nothing about it so I got this script from the Roblox wiki script page or whatever that website is. Thank you for helping though :smiley:

How the heck did ROBLOX manage to mistype their AwardBadge function-

Eh whatever, simple mistakes like these can happen anyways! :sweat_smile:

It was the Roblox wiki page I think but it was posted by another user. I don’t use the roblox wiki or whatever that other site is. I only use DevForum but If I need a script that is not simple enough to make in my ability then I look it up or watch a video on it