Pick up Weapons

So I’m trying to make a game where you go inside a house and there is an axe, a sword and bow and arrows on the table. I want to be able to walk up to one and have it list like the damage stat and the range stat and when I press f I want it to come to my hand. I’ve tried dozens of scripts on this website but none of them work. Please help!

The script below should you get started. However, based on your question it seems like you really should spend some time learning to script. It will be very difficult for you to advance your skills without learning the fundamentals of coding. Not trying to be unhelpful but just advice from my perspective. As far as the script below goes, add an input in the input manager named “Interact” and then tag your pickup gameobject with a tag named “Pickup”. Then simply have a disabled version of the weapon already on your character and enable it when they pickup the world item.

   public gameobject AK47;
             void Update()
                    {
                        if (Input.GetButton("Interact"))
                        {
                            UseItemRay = new Ray(PlayerCam.transform.position, PlayerCam.transform.forward);
                            if (Physics.Raycast(UseItemRay, out Hit, 10))
                            {
                                if (Hit.collider.tag == "Pickup")
                                {
                                   if hit.collider.name = "AK47"
                                      {
                                         ak47.setactive(true);
                                      }      
                                }
                            }
                        }
                }