-
What do you want to achieve? I want to make a GUI open when I click the q button
-
What is the issue? It plays the script and it prints but does not open the gui
local uis = game:GetService("UserInputService")
local canOpen = true -- makes a delay so that the user cant keep pressing it over and over again
uis.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.Q and canOpen == true then -- checks if the user is pressing q or not
canOpen = false
script.PaperFlip:Play() -- plays the sound of the paper moving
-- open journal
game.StarterGui:WaitForChild("Journal"):WaitForChild("BackgroundFrame").Visible = not game.StarterGui:WaitForChild("Journal"):WaitForChild("BackgroundFrame").Visible
wait(1.3)
canOpen = true
end
end)