local UserInputService = game:GetService("UserInputService") local Player = game:GetService("Players").LocalPlayer UserInputService.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.E then script.Parent:TweenPosition( UDim2.new(0,0,0), -- end position "Out", -- easing direction "Quart", -- easing style 0.75, -- time false, -- override? nil -- other stuff ) end end)
Here's the script for the GUI.
If you meant the gap is the top bar
, then just turn the ScreenGui
's property:IgnoreGuiInset
to true
.
Documentation:
I copied and pasted this from roblox developer hub because I was feeling lazy and didnt want to make a script, here is the code:
local StarterGui = game:GetService("StarterGui") StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType., false) --Put the thing you don't want in between the . and the ,
Copy and paste:
local StarterGui = game:GetService("StarterGui") StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType., false)