Server script inside the part:
local BadgeService = game:GetService("BadgeService")
local badgeID = 000000
script.Parent.Touched:Connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if not BadgeService:UserHasBadgeAsync(player.UserId, badgeID) then
BadgeService:AwardBadge(player.UserId, badgeID)
end
end
end)
I made the BadgeID 0000 on purpose
So, I don’t get any error when I touch the part, but when I touch the part repeatedly, it gives an error like this:
How to fix that?