My badge isnt being given

My badge isnt being given despite all the requirements being checked, theres no errors in the output either. The script should trigger when a part is touched, however instead of giving the badge nothing happens.

	if part.Parent:FindFirstChild("Humanoid")then


		local player = game.Players:GetPlayerFromCharacter(part.Parent)
		game:GetService("BadgeService"):AwardBadge(player.UserId,2130188224 )
	end
	
end) 

This is in a serverscript inside of the part.

local Part = script.Parent

local Debounce = false -- to make once (award the badge to player once)

script.Parent.Touched:Connect(function(hit)
	
	local Humanoid = hit.Parent:FindFirstChild("Humanoid")
	local Player = game.Players:GetPlayerFromCharacter(hit.Parent)

	if Humanoid ~= nil and Debounce == false then
		Debounce = true -- (setting up the debounce true because it will award if its false)
		game:GetService("BadgeService"):AwardBadge(Player.UserId,1)
	end
	
end)

The same script as same as yours but probably must be in your game? Like public game.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.