kaan650
(Kaan)
April 1, 2021, 8:48am
1
Hi! I want to detect if player opened dev console or not. But i dont know how to detect. I searched on Developer forum and i did not find.
I tried this script but this script has an error how can i fix this?
Script :
print(game.StarterGui:GetCoreGuiEnabled("DevConsoleVisible"))
Error :
2 Likes
im not sure how this works maybe try “DeveloperConsole”
print(game.StarterGui:GetCore("DeveloperConsoleVisible"))
This is an issue that occurs when you call :GetCore too early. I don’t think there is an event that you can use to detect when CoreGui is loaded, but you can retry the call a few times, or just waiting until something like when the player’s character is added, etc.
Put this into LocalScript in StarterGui
print(game.StarterGui:GetCore("DevConsoleVisible"))
3 Likes
I think this topic may help you.
1 Like
Sorry. used wrong link there. edited
Not the same with the given script in the link above. It is when you press a UI, it opens. He wants to detect it when it is open.
1 Like
just use the game.StarterGui:SetCore(“DevConsoleVisible”,false) to close it