code:

wait(3)
local hitbox = workspace:WaitForChild("UnderGround_Area").HitBox_Enter_Sewer
local input = game:GetService("UserInputService")
local plrname = game.Players.LocalPlayer.Name
local plr = game.Players:WaitForChild(plrname)
local UI = plr.PlayerGui:WaitForChild("Sewer")
local run = false
--
input.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		print("Pressed E")
	wait(1)
	end
	end)

2 comments

0

Thank you! It really helped.

0

Make sure this is in a LocalScript, and make sure it is a descendant of a Player. I noticed that the double hyphen caused line 9 to appear to be a comment in the browser, but that doesn't happen in Studio.