How to attach entitys(Weapon) to character

Hello i have been looking around for the past wo hours trying to figure this one out on my own on how to make my character pick up a weapon when in range. if anyone has an idea of how to do this please give an idea of what im supposed to do
EDIT: Sorry let me clear it more… i want the character to be able to walk up to the weapon thats laying down then press a button like (E) and attach it so it can be used and placed back down when done