I have a badge that gives the player a teddy bloxpin gear, but it gives them a million of them, I want it to give them 1.
local badgeservice = game:GetService("BadgeService")
local id = (2127329720)
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
badgeservice:AwardBadge(plr.UserId, id)
end
end)
local mps = game:GetService("BadgeService")
script.Parent.Touched:connect(function(plr)
local player = game.Players.LocalPlayer
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
badgeservice:AwardBadge(plr.UserId, id)
game.ServerStorage.TeddyBloxpin:Clone().Parent = player.Backpack
game.ServerStorage.TeddyBloxpin:Clone().Parent = player.StarterGear
end
end)
end)

1 comment
Use something called debounce