Setting the rootpart position to the position in animation

  1. What do you want to achieve?
    I want to have the enemy’s position not reset back to the players position after the animation is finished. I want the enemy’s position to stay as is when the animation is complete

  2. What is the issue?
    The enemy’s position gets reset back to the players position after the animation is finished.

  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    I’ve done a bunch of debugging and just overall thinking the issue out. Is this happening because the way I animated the enemy? Surely there is a way to do what I’m trying to achieve though. Also I have tried setting the enemy’s HumanoidRootPart CFrame to the CFrame of the enemy rootpart during the animation, however when the animated finished the cframe was reset still.

Sorry if I explained it poorly, if you have any questions let me know.

yea, it is. usually when you have enemy placement animations like this, you should be making a seperate animation for the victim and user animation then welding it to an offset (which will solve your issue). unfortunately i can’t proceed blindly so you will have to figure this out yourself or perhaps some extra context would help.

I see, how would I be able to know the exact distance from the player I need the enemy to be though? Obviously it’s easy in blender because I can set up the distances myself.

you can just guess since it doesnt need to be exactly on the dot, im guessing this is just a 1 stud offset so you would do

local charWeld= Instance.new("Weld")
charWeld.Parent = userRootPart
charWeld.Part0 = userRootPart
charWeld.C0 = CFrame.new(0, 0, -1) * CFrame.Angles(0, math.rad(180), 0) -- replace -1 with -n (n being your offset)
charWeld.Part1 = victimRootPart