Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Badge not being awarded with remote event?

Asked by
corbenv 17
4 years ago

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

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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.

0
But it is the correct ID: https://www.roblox.com/badges/2124476391/Whos-there corbenv 17 — 4y
0
Do you have an event connector that connects your award function? Like in localscript: knockbadgeEvent.OnClientEvent:Connect(onknockbadgeFired) LucarioZombie 291 — 4y
Ad

Answer this question