Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Badge not being awarded with remote event?

I'm trying to give a badge every time this loop fires, but it just does not do anything. No errors in output either.

Regular script:

local Knock = script.Parent.Knock
local a = script.Parent
local knockbadgeEvent = game.ServerStorage.knockbadge

while true do
    wait(math.random(5,6))
    knockbadgeEvent:FireAllClients()
    Knock:Play()

Local Script:

local badgeID = 2124476391
local bs = game:GetService("BadgeService")
local player = game:GetService("Players").LocalPlayer

local function onknockbadgeFired()
    bs:AwardBadge(player.UserId, badgeID)
end

There is a lot more to the regular script but it's not going to help solve it it's just a bunch of material and surfacelight brightness changing.

1 answer

In your localscript, your badge ID points to a model and not a badge. Id 212447639:https://www.roblox.com/library/2124476391/SolidModel Find the proper badge ID (Either in studio or your inventory) and replace it in the localscript.

Also note the bade can only be awarded if the badge is for the game the user is playing.

2 comments

0

Do you have an event connector that connects your award function? Like in localscript: knockbadgeEvent.OnClientEvent:Connect(onknockbadgeFired)

This discussion is preserved as it was. New answers, comments, and votes are closed.