EDIT: Included the entire LocalScript this time EDIT 2: Fixed in Community Chat
For some stupid reason this UserInputService function wont work at all. It's in a localscript, located in PlayerGui, however for some reason it wont work. The rest of the script works fine..
local Point=script.Parent.Adornee.Position
local Plr=game.Players.LocalPlayer
local Active=false
while true do
wait(0.1)
if Plr:DistanceFromCharacter(Point) < 10 then
script.Parent.Enabled=true
Active=true
else
if script.Parent.Parent:FindFirstChild("Quartermaster") then
script.Parent.Parent.Quartermaster:Destroy()
end
script.Parent.Enabled=false
Active=false
end
end
game:GetService("UserInputService").InputBegan:Connect(function(Input,GPE)
if not GPE then
if Input.KeyCode==Enum.KeyCode.E and Active==true then
local UI=game.ReplicatedStorage.Userinterfaces.Quartermaster:Clone()
UI.Parent=game.Players.LocalPlayer.PlayerGui
end
end
end)

2 comments
You did put this in a local script, right?
Yeah.