I am trying to make a tiny keyboard that when you press a certain key, it brings up a ScreenGui, the ScreenGui, in this case, does not pop up, and there are no errors.
You said certain key, Right? Your script activates whenever you click the clickdetector mentioned it. If you want to detect keypresses, use UserInputService!
Else, if you wanted to detect clicks on a specific part, continue on what you are doing
Make sure that this is a LocalScript. It is not possible to change the GUI via Script because the Gui is individual for each person.
Don’t try to change StarterGui. You won’t be able to work with StarterGui. A bit of theory - Everything you do in StarterGui is duplicated in PlayerGui. And only PlayerGui can be changed via LocalScript. To access PlayerGui is possible only through a LocalScript. local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
PlayerGui contains all the GUIs that you made in StarterGui.
Instead of the Gui on/off operation, I advise you to change the Frame.Visible. This is a more optimized solution. Let ScreenGui be always enabled. And everything else that you want to add, add under the Frame.
Did you put anything inside of the Screengui? If you didn’t then the that explains why. You need to put something inside the ScreenGui for something to appear on-screen. (A UI Object)