You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
What is the issue? Include screenshots / videos if possible!
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Hey, I’m confused about the whole badge service stuff. I’ve looked at the Roblox website describing how it all works but I’m just understanding. Site → BadgeService:AwardBadge (roblox.com) Below shows a script in a Part. Iv’e tested this a couple of times and I’m not receiving the badge. I’ve also checked to see if I own the badge, and I don’t. Can someone please help me understand?
local badgeservice = game:GetService("BadgeService")
local id = 2125499645
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not badgeservice:UserHasBadgeAsync(plr.UserId,id) then
badgeservice:AwardBadge(plr.UserId,id)
end
end
end)
local badgeservice = game:GetService("BadgeService")
local id = 2125499645
game.Workspace.Test.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not badgeservice:UserHasBadgeAsync(plr.UserId,id) then
badgeservice:AwardBadge(plr.UserId,id)
end
end
end)
local badgeservice = game:GetService("BadgeService")
local id = 2125499645
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not badgeservice:UserHasBadgeAsync(plr.UserId,id) then
badgeservice:AwardBadge(plr.UserId,id)
end
end
end)