✓ Accepted answer
Yep, all you need to do is use badge service
In the code they provide, they do
local BadgeService = game:GetService("BadgeService")
local function awardBadge(player, badgeId)
local success, badgeInfo = pcall(function()
return BadgeService:GetBadgeInfoAsync(badgeId)
end)
if success then
if badgeInfo.IsEnabled then
local awarded, errorMessage = pcall(function()
BadgeService:AwardBadge(player.UserId, badgeId)
end)
if not awarded then
warn("Error while awarding badge:", errorMessage)
end
end
else
warn("Error while fetching badge info!")
end
end
You are able to do this on the server, no need to fire the client with remote event/functions.
To ensure everyone in the server receives the badge, just use player service and use the function GetPlayers() in a loop.
This should be all you need, good luck!
If you need further help, please make sure to edit your post with the code you use.
If you have any questions, let me know and I'll respond when I can.
Make sure to mark this solution as correct if it works.
1 comment
Ok. I will use a for - pairs loop to connect to all players and hopefully that should work