Hello i’m sorry for wasting anyones time again. but i can’t find a answer to my question anywhere else
I’m having some trouble figuring out why UserInputService is not detecting the input. i have tried trouble shooting the code, but it seems that it’s not even detecting that i am even pressing a key. I’m totally stumped why this doesn’t work, i really hope that this isn’t a simple answer otherwise i will feel really dumb.
Here is the code
local UIS = game:GetService("UserInputService")
local holding = true
UIS.InputBegan:Connect(function(input, isTyping)
print("Detected The Button Press")
if input.KeyCode == Enum.KeyCode.E then
print("Detected The Input Was E")
if isTyping then return else
if holding == true then
print("Detected That The Player Was Holding, And The Script Is Activated")
end
end
end
end)
I have tried to look for answers online and even tried restarting roblox studio to see if this was a bug in the engine. I’m not getting any errors either. Any help would be appreciated alot.
local UIS = game:GetService("UserInputService")
local holding = true
UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then
return
end
print("Detected The Button Press")
if input.KeyCode == Enum.KeyCode.E then
print("Detected The Input Was E")
if holding then
print("Detected That The Player Was Holding, And The Script Is Activated")
end
end
end)