Help Needed for Dynamic Character Selection GUI

Subject: Seeking Assistance with Creating a Dynamic Character Selection GUI

Hello Roblox Developers,

I hope this message finds you well. I am currently working on a project that involves implementing a dynamic character selection GUI for players in my game. I’m in need of some guidance and assistance on how to achieve this smoothly. Here’s a breakdown of what I’m aiming for:

I want to create a user-friendly character selection GUI that allows players to easily choose from a list of characters available in a folder named “charc” within ReplicatedStorage.

Features Needed:

A Text Button: I want a text button to be always visible, perhaps in a corner of the player’s screen, that when pressed, opens the character selection GUI.

Character Display: When the player opens the GUI, it should display the available characters, which are stored in the “charc” folder.

Selecting a Character: Players should be able to select a character by pressing a button associated with that character. Upon selection, the power GUI of the chosen character should become visible.

Disappearance on Death: The character power GUI should automatically disappear when a player dies.

What I’m Looking For:
I would greatly appreciate it if anyone could provide guidance or code snippets to help me achieve this. Specifically, I’m looking for accurate and functional code that accomplishes these tasks efficiently.

code i have written
local ReplicatedStorage = 
local StarterPack = 
local Players = game:GetService("Players")

local CharcFolder = 

local function createCharacterSelection()
local player = Players.LocalPlayer
local gui = player:WaitForChild("PlayerGui")

local selectionGui ="ScreenGui")
selectionGui.Name = "CharacterSelectionGui"
selectionGui.Parent = gui

-- Create a frame to hold character previews
local frame ="Frame")
frame.Size =, 0, 1, 0)
frame.BackgroundColor3 =, 0.2, 0.2)
frame.Parent = selectionGui

-- Create your character selection menu here, including previews and select buttons.
for _, characterModel in pairs(CharcFolder:GetChildren()) do
    local characterButton ="TextButton")
    characterButton.Text = "Select " .. characterModel.Name
    characterButton.Parent = frame
    characterButton.Size =, 200, 0, 50)
    characterButton.Position =, -100, 0, 50 * _)
    -- Add an event handler for when this button is clicked
        -- Morph the player into the selected character
        player.Character = characterModel:Clone()
        player.Character.Parent = workspace
        -- Make the character-specific GUI visible
        local characterSpecificGUI = characterModel:FindFirstChild("CharacterSpecificGUI")
        if characterSpecificGUI then
            characterSpecificGUI.Visible = true
        -- Close the selection menu

    local charactersButton = 


I believe that with the talented developers in this community, we can make this character selection process smooth and enjoyable for our players. Thank you in advance for your help and expertise.

If you have any questions or need further clarification, please feel free to ask. Your support is much appreciated.

Best regards,