Fastest and most proficent way of disabling CoreUIs on join?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I am looking for an easy and proficient way to have it so when a player joins, CoreGUIs are immediately disabled and the first thing they see would be the designated Menu ScreenGUI.

How should I go about creating a fast and seamless system like this? And would anyone mind providing some code to help get me started? Thanks all.

you can put it in replicated first so it would load faster (I think)

local script

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
1 Like

Create a script inside of server script service that contains code like this:

-- Define a function that will be called when a player joins the game
game.Players.PlayerAdded:Connect(function(player)
    -- Disable the player's Core GUI
    player.PlayerGui.ChildRemoved:Connect(function(child)
        if child.Name == "CoreGui" then
            child.Parent = nil
        end
    end)
end)

Disclaimer: This code was AI generated from: https://chat.openai.com/chat

As an alternative, you could disable other core elements using something like this:

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.