is it possible to check if the player has the badge, using the clickdetector to give the tool, if he has the badge?
I made this, but is not working. the script works normally without the check badge. but I need to check
local BadgeService = game:GetService("BadgeService")
Toolname2 = "sword"
function give(Player)
if BadgeService:UserHasBadgeAsync(Player.UserId,2124605681) then
if not Player.Backpack:FindFirstChild(Toolname2) then
local Tool = game.ServerStorage[Toolname2]:clone()
Tool.Parent = Player.Character
end
end
end
script.Parent.ClickDetector.MouseClick:connect(give)