This issue is so oddly specific that I wasn't able to find the solution anywhere else, what's wrong with my script?
local clicked = script.Parent.ClickDetector.MouseClick
local part = script.Parent
local debounce = false
local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")
local IDToAward = 0 -- There's an actual ID here.
clicked:Connect(function(player)
if not debounce then
debounce = true
local explosion = Instance.new("Explosion")
explosion.Position = player.Character:WaitForChild("HumanoidRootPart").Position
explosion.Parent = workspace
debounce = false
if not BadgeService:UserHasBadgeAsync(Players.UserId, IDToAward) then
BadgeService:AwardBadge(Players.UserId, IDToAward)
end
script.Disabled = true
end
end)

1 comment
Alright, this worked! Thank you so much for your time.