local playrr = game.Players

game.Players.PlayerAdded:connect(function(player)
	script.Parent.MouseButton1Click:connect(function()
		repeat wait() until player.Character
		local hatID = 20298484
		local hat = game:GetService("InsertService"):LoadAsset():GetChildren()[1]
		hat.Parent = player.Character
		playrr.PlayerGui.ScreenGui.Frame.Visible = false
	end)
end)

game.Workspace.ChildAdded:connect(function(player)
	local name = player.Name
	local playerinplayers = game.Players:FindFirstChild(player.Name)
	playerinplayers.CanLoadCharacterAppearance = false
end)

I'm trying to get it so that when you click on a class, you change character and the GUI disappears.

1 comment

1

Providing errors, if any, and what it is doing will help others solve your problem better. Any information about this you can give will help us!