I wanna make it so that when the player presses Q, it shows the gui, but it's not showing, I put the gui in StarterGui and the local script inside StarterPlayerScripts.

local uis = game:GetService("UserInputService")
local randomgui = game.Players.LocalPlayer.PlayerGui.RandomGUI



uis.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Q then
		randomgui.Enabled = true 
	end
end)

6 comments

0

where is the script placed?

0

Inside StarterPlayerScripts

0

Place the script inside StarterGui or StarterPack

0

It would still work even if it was in there. If it was a local script.

0

Any errors?

0

It says that the gui is not a valid member of PlayerGui