Why is the badge not being awarded?

I am using DataStore2 to create a leaderboard, and I have a badge for 1000 coins, but the issue is the badge is not being awarded and Im not getting any errors? Does anyone have any clues to why this could be.

Console:

:arrow_forward: eggspIicit has reached 1000 coins. Checking badge… (x4) - Server - Leaderboard:35
:arrow_forward: Awarding badge to eggspIicit (x4) - Server - Leaderboard:42

	CoinStore:OnUpdate(function(delta)
		-- This function runs every time the value inside the data store changes.
		Coins.Value = delta

		-- Check if the player has reached 1000 coins and award the badge
		if delta >= 1000 then
			print(player.Name .. " has reached 1000 coins. Checking badge...")
			local success, hasBadge = pcall(function()
				return badgeService:UserHasBadgeAsync(player.UserId, 3970149109032495)
			end)

			if success then
				if not hasBadge then
					print("Awarding badge to " .. player.Name)
					local awardSuccess, awardError = pcall(function()
						badgeService:AwardBadge(player.UserId, 3970149109032495)
					end)
					if not awardSuccess then
						warn("Error awarding badge to " .. player.Name .. ": " .. tostring(awardError))
					end
				else
					print(player.Name .. " already has the badge.")
				end
			else
				warn("Error checking badge for " .. player.Name .. ": " .. tostring(hasBadge))
			end
		end
	end)

^ this script is apart of a huge leaderboard script

Can anyone help ?
max character limit