I want to create a kicking animation in ue4. How should I do it?

I want to create a blueprint so that i can hit an object depending on its position i.e. if it is nearer to right leg then the character hits with right leg. and how can I control the force depending on the time for which we press the key .i.e. more force for more time the key is pressed

You would have to make the animation separately from the blueprint.

First, you’d need some test points for each leg. Then determine the distance from those to the object that you want to kick. As for the force of the kick, you’d probably use an impulse on the ball in the direction you want to kick it, with the strength of the impulse increased the longer the key is pressed.

yeah got it. thanks.