How to make a GUI for specific hats

Hello everyone, I’m curious on how I could make a custom GUI that autosaves custom hats that certain players have obtained throughout certain events in my game. For example, I want to make a custom dominus that a player can obtain through clicking the item which then will add it to their GUI. Then that player can click on the dominus and it will automatically add it to their head and when they click on the hat in the gui again it removes it. But I don’t want everyone to be able to wear it only the people who clicked on the dominus. Does that make sense to anyone and does anyone know how to do that? Note: I can get into more detail if that didn’t make sense.

You’re talking about the character being able to customize themselves. What you’re going to want to use is the Humanoid Description System. This will allow for you to very easily change their accessories, including giving you the ability to give them a Dominus or to take it off.

Nevermind it does but how could I change it without changing everyone?

You can edit their humanoid description actually very easily. Here’s an example of changing their hat to a dominus:

local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
if humanoid then
	local descriptionClone = humanoid:GetAppliedDescription()
	descriptionClone.HatAccessory = 96103379
	humanoid:ApplyDescription(descriptionClone)
end

You’re going to want to run this in a local script.

Do I insert this into my text label(sorry for many edits)

No, that goes into a serverscript. I think I may have misunderstood you, why do you need a Text Label?

I’ll break it down more. So for example, a player clicks a dominus and then in the custom GUI it makes it that they can click the textlabel to wear the item while other players can’t if they didnt click the dominus

Sorry for textlabel, I meant decal/TextLabel doesnt really matter

Ah, you would want a TextButton to do the job there. You should read up on Remote Events to get server to client communication. What you’re trying to do might be a little out of your experience level

What I’m looking for is a remove event Cilent-Server I believe. But will this article let me know how I can script the GUI to make it that the dominus appears for the player and all other players?

Yes, if you run the code I gave you in a server script in a function connected to OnServerEvent(), it will show for all players. Sorry if that didn’t make much sense but if you read through that article you should decipher it :slight_smile: