Trying to make it were if i press "E" it will do something but i want it so you have to be close to the part for it to function.
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.E then
print("E was pressed")
end
end)

1 comment
use player:DistanceFromCharacter(vector3 value)