i have this script
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input)
local keyIn = input.KeyCode
if keyIn == Enum.KeyCode.A then
print("A was pressed!")
end
end)
and it's in a local script parented to a part and i don't understand why it doesn't work any help would be apriciated

2 comments
and what does that exactly mean? "localplayer's directory "
By that i meant places like: StarterGui, StarterPlayer->StarterCharacterScripts, StarterPlayer->StarterPlayerScripts