Toggle items for badges

I want to make a system where you can toggle items for badges with a gui.
Its kinda complicated but i explain:
my game has a lot of badges, and most of these badges give player item if he has the badge. i dont want to fill up the entire players inventory so i want to make a gui where you can turn on or off badge items, so your inventory doesnt get filled with items you dont need.

1 Like

Hello good sir,

You can make a folder of BooleanValues inside the player Instance which will include all of the gamepasses, I’d preffer naming them by their ID’s.

After that, you can makin a remote function or event which would pass to the server whether the player wants to enable/disable specific badge.

All you would have to do then is checking whether the Badge’s BooleanValue is set to true or false (=> if it is true, give the player tool(s), however, if it is false, do not give the player the tool(s)).

If you would want to make these changes save, you can include DataStores.

I know there might be some better ways how you can go about this, but this feels like very simple and effective way of doing this to me.

Have a good day :slight_smile:

1 Like

This is the exact answer I was going to give!

Beat me to it, darn!

1 Like

Damn you beat me to it!

I think the best way to find them is to use :FindFirstChild() so it doesnt error

1 Like

how do i make a bool value inside the players instance?

This might give you an idea of what I mean

local badges = {} -- table containing ID's of your badges
local players = game:GetService("Players")

-- Run when player joins
    -- Make badges folder
    local badgesFolder ="Folder")
    badgesFolder.Name = "BadgeTools"
    badgesFolder.Parent = player

    -- Loop through badges and make a BoolValue for each of them
    for _, badge in pairs(badges) do
        local boolValue ="BoolValue")
        boolValue.Name = tostring(badge)
        boolValue.Value = true -- Do you want the badge tools to be enabled by default?
        boolValue.Parent = badgesFolder

do i put this in a local script or normal script? and where do i put the local script/script?

This part would go into normal script, preferably in the ServerScriptService.

is there any video tutorials on this? im not really good at scripting