How do you guys go about aligning incorrectly positioned animations?

so i have a pick up player animation and a weld holds the two players together but the problem is is that the legs should be on the shoulders if that makes sense but they’re in the air. i changed the position of the C0 on the weld and that helped a bit. im just wondering how would u guys go about it? ty

script:

function module.createWeld(otherplr:Player, mychar)
	local otherchar = otherplr.Character
	local weld = Instance.new("Weld", otherchar.LowerTorso)
	weld.Name = "playerWeld"
	otherchar:MoveTo(mychar.Head.Position)
otherchar.LowerTorso.Position = mychar.Head.Position
	otherchar.LowerTorso.Orientation = mychar.LowerTorso.Orientation
weld.Part0 = mychar.Head
weld.Part1 = otherchar.LowerTorso
local othercharHumanoid:Humanoid = otherchar:WaitForChild("Humanoid")
	local othercharAnim = othercharHumanoid.Animator:LoadAnimation(script.othercharAnim)
	othercharAnim:Play()
otherchar.LowerTorso.CanCollide = false
end

vid:

Instead of creating a weldI you can create a WeldConstraint. After that you have to position the other character’s CFrame to be just a little bit behind your head’s CFrame. You can do that like this:

local offset = -1 -- The offset in studs
local rotation = mychar.Head.CFrame - mychar.Head.CFrame.Position
otherchar.LowerTorso.CFrame = CFrame.new((mychar.Head.CFrame.LookVector * offset) + mychar.Head.CFrame) * rotation

Also lemme know if it works I haven’t really worked with r15 before :slight_smile:

1 Like

hey man, thanks a million for your response.

i took on your advice. the weld constraint performance wise did way better. i just didn’t know the difference between a weld and a weld constraint so big cheers for that. with the CFrame, you totally had the right idea. i just did a few tweaks and it worked!! :slight_smile:

	otherchar:MoveTo(mychar.Head.Position)
	otherchar.LowerTorso.CFrame = mychar.Head.CFrame * CFrame.new(0,0,1.5)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.