A ‘follow up’ of my previous topic, i managed to find a solution to it but for some reason the player cannot be awarded the badge, i tried firing remote events but that wouldn’t work as the player randomly gets the badge upon joining, which i don’t want to happen
Script is a normal script found inside part which is in workspace.
Here is a code snippet:
ClickDetector.MouseClick:Connect(function(Player)
local PGui = Player.PlayerGui
PGui.InvPoster.Frame.Visible = true
if value.Value < 5 then
value.Value += 1
elseif value.Value == 5 then
local hasBadge = BS:GetBadgeInfoAsync(badgeNumber, Player.UserId)
if hasBadge == nil then
BS:AwardBadge(Player.UserId, badgeNumber)
end
end
end)