hello! i’m trying to replace a grab system in my game based on WeldConstraints with AlignPosition. currently when I position the characters to each other (using OneAttachment mode) the alignposition seems to ignore the position I set and instead position them near the center of the world. How it’s intended to work is so the enemy character is held in place right in front of the character as the attack animation plays and damages them.
newHitbox.HitSomeone:Connect(function(hitCharacters)
for index, enemyCharacterModel in hitCharacters do
local humanoidRootPart : BasePart = characterWCS.Instance:FindFirstChild("HumanoidRootPart")
local enemyCharacterWCS = CharacterClass.GetCharacterFromInstance(enemyCharacterModel)
local enemyRootPart : BasePart = enemyCharacterModel:FindFirstChild("HumanoidRootPart")
if enemyCharacterWCS:HasStatusEffects({RagdollStun}) then continue end
local randomGrabSound = GrabSoundsFolder:GetChildren()[math.random(1, #GrabSoundsFolder:GetChildren())]
local soundPlayer = SoundManager.new(characterWCS.Instance, randomGrabSound)
soundPlayer:Start(Players:GetPlayers())
local alignPosition = Welder.AlignCharacters(enemyCharacterModel, humanoidRootPart.Position + Vector3.new(0, 0, -5))
clinchTrack:GetMarkerReachedSignal("hitboxEnd"):Once(function()
alignPosition:Destroy()
end)
end
end)
This is where I call the alignPosition. Note that I took out the firstCharacter argument since I realized it wasn’t doing anything