Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

this Developer Console is not working no errors?(GUI)

Asked by 3 years ago

i am trying to make a gui that shows data to your game like how many players there is and other stuff.

Problem:

when a devloper of the game presses on the LeftShift the Console wont appear.

my Code:

local SGS = game.StarterGui.DEVONLY
local Plr = game.Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")


game_makers = {539909602}




for i,v in pairs(game_makers) do
    if game.Players.LocalPlayer.UserId == v then
        UserInputService.InputBegan:Connect(function(input,gameprossideEvent)
            if input.KeyCode == Enum.KeyCode.LeftShift then
                if SGS.ScreenGui.Mainloop.Visible == false then
                    SGS.ScreenGui.Mainloop.Visible = true

                else
                    SGS.ScreenGui.Mainloop.Visible = false              
                end
            end 
        end)        
    else
        print("YOU ARE NOT A DEV!!!")


    end
end

is there any reason for this code to not work?

0
i dont see any error Necro_las 412 — 3y
0
no errors but the Gui wont apper Retallack445 75 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

When the game starts, the guis in StarterGui will be moved to PlayerGui, change the path to this and it should be working.

local Plr = game.Players.LocalPlayer
local SGS = Plr.PlayerGui.DEVONLY
0
Please tell me if that works. NotTheChara 191 — 3y
0
yes thanks @NotTheChara Retallack445 75 — 3y
Ad

Answer this question