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

How do I make someone recieve a item via badge?

This is kind of like my gamepass question, but about the gamepass, I just want them to have this item forever, no matter how many times they die or so.

That's pretty much it...

They must have the badge in order to get the item.

1 answer

✓ Accepted answer

hey there! You would need to use UserHasBadge, and if they do find your item and clone it to their backpack/wherever it is needed

Here is an example;

local BadgeId = 123
--Change ^ To the badge Id
 
game.Players.PlayerAdded:connect(function(p)
    if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then
        print("The user has this badge")
	--give item
    else
        print("The user does not have this badge")
	--remove this if you want, it is not needed
    end
end)

If this helped leave a thumbs up, and accept the answer, it gives us both rep!

2 comments

0

Where do I input the item ID or?

0

In the variable "BadgeId"

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