How do i get the gun to go on my hand when i pick it up

i made it so i can pick up the gun but when i pick it up it goes on my feet instead of my R_Hand i have set it to go to my right hand but it wont

Try setting the scale rule to “Keep World”. Make sure that the bone name is correct.

didn’t do anything

first why are you calling the script from so many events? call it from one place only and make sure its only the character that can trigger it. this makes it way easier to diagnose and fix. next where is your socket exactly? is it in the right hand? is it aligned correctly? is the name you provided exact? also what are the attributes of the guns mesh? is the point at which you want to be holding the gun the same place as the guns origin? is there any collision issues between the gun and the character? have you tried playing with all the settings of the attach to component node (these can sometimes be tricky)?

the gun is in the right hand and it is the right name

ok the gun is obviously not in the right hand since your questions says its at your feet. did you look into the other things that i brought up? the things i asked were some of the most common reasons for the result that youve gotten. i also asked them as a diagnostic to establish a baseline of your current setup and settings. so try some of things like setting the guns collision to ignore pawn to see if its a collision issue.

i didnt say i set it to the foot socket its not even on the foot socket i said its on the foot because its on the floor and follows the player and the socket is in the right place and the script is fine i put the script like that so i can pick up the weapon and i have also messed with the collision its fine no issue with it

Is the blueprint above the gun’s blueprint? Does the gun mesh in the blueprint have an offset from its root component?

no one said anything about a foot socket dude. i asked about the socket location and your reply was the gun is in hand, but the gun in the picture is located on the ground and the gun is not the socket. are you sure you know whats sockets are? sockets are added to the bones of a skeletal mesh. i realize that may be some basic stuff and you may take that the wrong way but working off of whats been said there seems to be some confusion.

have you tried setting the guns location to the socket location once its been attached?

look i already said the gun is in the socket hand_R its on the floor because there is something wrong or maybe i havent added something in thats why i need help i know what sockets are i put the gun in the right hand

your again not providing any new or useful information to work from. i get that you used the attach to component node with the target being the player and its socket that is in the hand. that does not imply that youve tried setting its location via a set location node. it also doesnt say any steps youve taken to try to remedy the situation or solutions that youve tried. it could literally be that you are attaching the gun but it is retaining its offset once its brought into local space. so you would end up with the gun moving with the hand but in an offset position in which case a simple solution is to set its location to the location of the socket. attaching to a component doesnt mean attaching and moving. you could also experiment with the location and scale settings to see if those affect it. When i first started out and was attaching to actors that was one issue that i ran into.

main point here is be descriptive and exact in what you say, and give information and feedback on what you try and the results that you get.

Did you rename the hand_R socket to Sniper?

ye but i need to change it to gun hand

how can i provide new information when i dont even know whats going on i have been working on this for about a week now and nothing has changed i am modifying everything just to see a change but nothing is

What I recommend is that you create a new Blueprint class of type Actor. Name this new Actor “Master_Weapon”. Any gun you make, make it by Content Browser → Add New → Blueprint Class → Actor → Search for “Master_Weapon” and make it a child of that as shown in the picture.




Make the damage, accuracy, and all other statistics for the weapons in the Master_Weapon class, then open the weapon you made, click on Class Defaults, and set the statistics that way. Changing statistics in Weapons is shown below.




Now, in the Player Blueprint, add a child actor and name it Equipped Weapon. Do this by clicking Add Component → Child Actor. Then, when you want to change your weapon, you can simply set the child actor class as shown.




Now open the skeletal mesh for your arm model and add a socket to the weapon holding hand called “HoldingPoint”.




Now go back to your Player Blueprint and go to the Construction Script. Add an Attach to Component node and attach your arms, then set the socket to attach to to your “HoldingPoint” socket. Make sure that Location and Rotation are snap to target.




Hope this helps, and let me know if you need a little more help!

[Learn more about sockets and how to use them.][6]

[Learn more about Child Blueprints and how to use their children.][7]

[Learn more about using functions with the Child Actor Component to shoot, reload, etc…][8]

thats quite literally what the person was already doing.