Incorrect teleport position

Im making that you get teleported 3 studs infront of another player but is always doing the wrong direction (example left)

heres a cut down version

function Main:FinisherFunc(char,enemychar,DATA,knockback)
	if DATA.Finisher == "None" then return end
	if DATA.Finisher == "Detroit" then
		DATA.KnockbackStrength = 300
		DATA.KnockbackDirection = Vector3.new(0,70,0)
		knockback:Destroy()
		RagdollModule.Off(char)
		
		local distBetween = 3
		enemychar.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.Position + (char.HumanoidRootPart.CFrame.LookVector * distBetween))
		--enemychar.HumanoidRootPart.CFrame = CFrame.lookAt(enemychar.HumanoidRootPart.Position,char.HumanoidRootPart.Position)
		--Main:AddKnockback(char,enemychar,DATA)
	end
end
1 Like

Try this:

enemychar.HumanoidRootPart.CFrame  = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -distBetween) * CFrame.Angles(0, math.rad(180), 0)

Try doing

enemychar.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(char.HumanoidRootPart.CFrame.LookVector * distBetween)

it still teleport them to the side, ill show a video
(they get flung, they just dont disappear)

edit- i fixed it, apparently my knockback script is causing it too go the wrong direciton

1 Like

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