Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

2 comments

0

i dont see any error

0

no errors but the Gui wont apper

1 answer

✓ Accepted answer

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

2 comments

0

Please tell me if that works.

0

yes thanks @NotTheChara

This discussion is preserved as it was. New answers, comments, and votes are closed.