Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I want to make a GUI disappear when you press a key so may someone please help?

Asked by 3 years ago

This is a local script

Input = game:GetService("UserInputService")

game.ReplicatedStorage.ShowGUIBlue.OnClientEvent:Connect(function()
    script.Parent.Frame.Visible = true
end)
Input.InputBegan:Connect(function(input,gameProccesedEvent)
    if input.KeyCode == Enum.KeyCode.Backspace then
        script.Parent.Frame.Visible = true
    end
end)

The

script.Parent.Frame.Visible = true

part isn't working but everything else is. For example, when I put a print("something random") it will work but it is that part that just won't work.

0
On line 8 you're setting the visible state to true. You need to set it to false instead. DevingDev 346 — 3y
0
K im an idiot techingenius -82 — 3y
0
Also you should put this as an answer techingenius -82 — 3y

Answer this question