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?
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