Why it dosent detect?

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!

You need to check if processing is FALSE, you’re only checking if they are processing.

if not process then
    ...
end
1 Like

change if process then into
if process then return end

process is the argument thats true if ur focused on a textbox

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.