Developer Console

Hi everyone i am trying to disable my developer console, any of you know how i can disable it?

2 Likes

You cannot disable the developer console. However, you can repeatedly hide it every frame. You should also research if the topic exists before posting a new one!

Check out the following topic:

3 Likes

Yes, but I see in many games that they disable it.

You can do a while true loop that turns it off using DevConsoleVisible function. Add this script to StarterPlayerScripts.

local StarterGui = game:GetService("StarterGui")
while wait() do
StarterGui:SetCore("DevConsoleVisible", false)
end

Although, it’s a way that could make the game’s performance worse. You would need to detect if a player opened the menu.

local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F9 then
StarterGui:SetCore("DevConsoleVisible", false)
end
end)

And that works perfectly.

2 Likes

You are able to use the StarterGui:SetCore("DevConsoleVisible", false) function in a UserInputService.InputBegan call. In the UIS call, you can do a check to see if Enum.KeyCode.F9 was pressed. If so, call the SetCore function.

1 Like

You cannot disable the Developer Console, but you can hide it by calling SetCore on StarterGui (DevConsoleVisible value) every frame.

Avoid “while true do”(s) and use events instead

local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")

RunService.Heartbeat:Connect(function()
        StarterGui:SetCore("DevConsoleVisible", false)
end)
1 Like