First time join badge script not working

Have you tried using the script in-game. You might just not be able to get the badge in studio. (For clarification, I mean publishing, then testing the game in a live game session.)

I have tried in game but the same error occurs.

If the error is always “Failed to award badge.” then my best guess is that you already own the badge, or something is internally wrong which would be the last possibility.

Perhaps delete the

local function onPlayerAdded(player)
	awardBadge(player, BADGE_ID)
end

And from the player added directly try to launch the awardBadge function.

Also remove from both functions BADGE_ID in the () beacuse the error seems to not get the badge so that could be the problem try sending the player badge itself

Dont do that man, the variable in the function and the variable in the script will overlap

Also if the error still occurs after what i sayed its probably the fact that you either have the wrong id or you already have the badge

Ok, I’ll try all the things you mentioned.

Figured it all out, thank you everyone.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.