When i press F or any other key it dosent work. (Print true)
Here is my code:
UIS.InputBegan:Connect(function(Input, process)
if process then
print(true)
if Input.KeyCode == Enum.KeyCode.F then
local char = player.Character
local hum = char:WaitForChild("Humanoid")
local HRP = char.HumanoidRootPart
if (mouse.Target.Position - HRP.Position).Magnitude < distance then
if mouse.Target:IsDescendantOf(workspace.PickableItems) then
print(true)
end
end
end
end
end)
Thank!