my local script
local plr = game:GetService("Players").LocalPlayer
local Mouse = plr:GetMouse()
local cas = game:GetService("ContextActionService")
local function onEPress(name, state, input)
if state == Enum.UserInputState.Begin then
game.ReplicatedStorage.RemoteEvent1:FireServer()
end
end
cas:BindAction("ePressed", onEPress, false, Enum.KeyCode.E) -- basically when E is pressed, onEPress runs.
My script
game.ReplicatedStorage.RemoteEvent1.OnServerEvent:Connect(function()
-- Any code in here will run when RemoteEvent is triggered
script.Parent.Transparency = 0.5
end)

4 comments
No need, if you only want the player to see the gui.
No
well how do you do it then?
do I use this
local function onQPress(name, state, input) if state == Enum.UserInputState.Begin then script.Parent.Frame.Visible = true