Turn of and on a GUI with E key

Please mark this solved, as it is solved.

how can I mark it solved?
is it the solution button?

Press solution on the post that helped you most.

its working but the GUI wont show, is this a bug. the output says it fine?

is the frame visible? If not, make it visible

its visible, but it dose not work?

Try doing this: Make your screen GUI enabled.
Then, make your frame INVISIBLE
Change the script so when you press e it makes the frame VISIBLE.

i did that, and i even added a print just so it will show but its not working ?

local Frame = script.Parent.Frame

UIS.InputBegan:Connect(function(input, Chat)
	if not Chat then
		if input.KeyCode == Enum.KeyCode.E then
			if Frame.Visible == true then
				Frame.Visible = false
			else
				Frame.Visible = true
			end
		end
	end
end)

if this does not work, I am not sure. Maybe make a button to open the GUI as this would be more easy and you would not have to inform the players to press E.