Hmmm
Can you check to make sure your output is set to show all output types
All of them are shown
Hmmm
Here’s one last test, add a print to the front of the script.
If nothing gets printed, use Ctrl
+ Shift
+ F
and see if a different script is deleting or disabling your script. Are you using a framework?
You can probably search for:
.Disabled =
I believe i already tried this, i tried it again, and it prints text only outside of the UserInputService event
but when i try to do anything inside said event it doesnt register anything being pressed
My best guess then would be that some other script is disabling or destroying your user input script.
I did a quick test, and found that something could be printed before the script was destroyed. But when it was destroyed all connections were lost.
-- script 1
print('testy')
local uis = game:GetService("UserInputService");
uis.InputBegan:Connect(function(i)
print(i.KeyCode);
end)
uis.InputBegan:Connect(function(i)
print(i.KeyCode)
end)
-- script 2
script.Parent.toBeDeleted:Destroy();
I’d take a look into that
Try this in local script
UIS.InputBegan:Connect(function(input, isTyping)
if Istyping then
return
elseif input.KeyCode == Enum.KeyCode.E then
print("E Was pressed")
end)
end)
i can put a print statement after the UIS event and it will print whatever i said to print, and there is no other scripts disabling or destroying the original script, i have already checked my other scripts to make sure that wasn’t the issue
No this had the same result as the other person, it didn’t work unfortunately
Wait a second do you want to send this to the serverscript? or is it just a test
It is just a test to see why UIS isn’t working
Ok maybe try something different like part:Destroy() because i dont think print will work in this case
Thats the issue i tried warning and tried using the actual piece of code i wanted too, it simple isn’t detecting that im pressing a input
actual piece of code, what does it look like
@kl87hn666 try this
local UserInputService = game:GetService("UserInputService")
local Kinput = false
local Iinput = false
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.E then
Kinput = true
while Kinput == true do
wait()
print("E Was Pressed")
end
end
if input.KeyCode == Enum.KeyCode.E then
while Iinput == true do
wait()
print("E Was Pressed")
end
end
end
end)
local UIS = game:GetService("UserInputService")
local holding = true
UIS.InputBegan:Connect(function(input, isTyping)
if input.KeyCode == Enum.KeyCode.E then
if isTyping then return else
if holding == true then
local plr = game.Players.LocalPlayer
local Remote = game.ReplicatedStorage.ESysEvent
Remote:FireServer(plr)
end
end
end
end)
try the other method i gave you
That’s not the issue i am having the issue i am having is UIS not detecting an input, but i gave your code a test and it did not work.
hmm wheres your script located
No… my script is in StarterCharacterScripts, i have also tried StarterPlayerScripts, and i have also tried everything that other people have suggested nothing has worked so far
have you tested the actual game, not in roblox studio?