Try something like this:
Add FSM to character. Start State, call it Ini. Here we first want to find the attachment game object, that is child of hand. If you want to do this right, prefer referencing game objects by name, or tag, etc. and rather not by drag and drop (only if the object is part of the same prefab). A game object in the scene is a concrete individual object, whereas a prefab is a blueprint that can be used to produce actual objects. So name it “WeaponHolder” or something. Then add the find child action. Thus, when the character spawns, it will look for the WeaponHolder, and remember it in a variable. Finish event...
Next state, called “unarmed”, say we wait for key down, space bar. Later on, use button down and Unity’s input manager. But for prototype or web game, keys are fine.
Next state, create game object, and reference the sword prefab. Also store the object (you need this to reference the actual sword later). Next action, set parent, to move it below the WeaponHandler, which we conveniently stored as a variable. I believe the parent action allows to set child’s transforms to zero everything. No rotation, 0/0/0 location. That’s the point of the preparation above, because now you can make weapons that will always work when simply dropped into the WeaponHandler at zero.
After that’s done, go to next state, called “armed”. In the same manner you can reverse back to unarmed (wait for a key here, if pressed, go to next state, destroy sword, then go back to unarmed).
Well, presto, now after pressing space, the character has the weapon in hand. But that’s just the start. Now when arming, you also need to to send animation trigger, to tell mechanim to go into “armed” set of animations and so on. Also, when armed, you want to activate another FSM to do the actual attacking etc. And switch it off when unarmed etc.
It’s not easy. You can do it in a few days, but you should start with something slightly easier as a first attempt.
Another tip: stuff like that can often be created manually. I.e. what do you need to do, exactly, so that the sword appears in the hand? Is it switching on a game object? Is it parenting and zero transform a prefab instance? That means, you can do this step by step in Unity’s editor. After you figured out what you need to do, you can make an FSM, almost like a macro, that does these steps in automated fashion.