I’m currently working on a few mechanics for a game (may or may not be released) and have been trying to implement a Killer-Carry mechanic similar to the one in Dead by Daylight. Unfortunately, my current attempts haven’t achieved the smoothness I’m aiming for.
After trying for a while, I came across a game called Violence District, which has a very clean and fluid Killer-Carry mechanic that closely matches my goal.
here’s a clip from Violence District that shows exactly the goal (the video does not belong to me).
and here’s my current code which uses Motor6d:
return function()
local replicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local pickUpPos = nil
local carryPos = nil
replicatedStorage.Events.Remotes.Weld.OnServerEvent:Connect(function(player, target)
if not (player.Character and target and target:FindFirstChild("HumanoidRootPart")) then return end
local victimRoot = target.HumanoidRootPart
local killerRoot = player.Character:FindFirstChild("HumanoidRootPart")
if not killerRoot then return end
-- Smooth rotate victim to face killer before pickup
local killerPos = Vector3.new(killerRoot.Position.X, victimRoot.Position.Y, killerRoot.Position.Z)
local targetLook = CFrame.lookAt(victimRoot.Position, killerPos)
local tween = TweenService:Create(
victimRoot,
TweenInfo.new(0.25, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
{CFrame = targetLook}
)
tween:Play()
tween.Completed:Wait()
target.Humanoid.PlatformStand = true
local newAttach = Instance.new("Attachment")
newAttach.Position = Vector3.new(0, -1, 0)
newAttach.Parent = player.Character["Left Arm"]
pickUpPos = newAttach.CFrame
local torso: BasePart = player.Character:FindFirstChild("HumanoidRootPart")
local motor6D = Instance.new("Motor6D")
motor6D.Part0 = target.HumanoidRootPart
motor6D.Part1 = player.Character["Left Arm"]
motor6D.Name = "Arm"
motor6D.C1 = pickUpPos
motor6D.Parent = torso
end)
replicatedStorage.Events.Remotes.LoopCarry.OnServerEvent:Connect(function(plr, data)
if plr.Character.HumanoidRootPart:FindFirstChild("Arm") then
plr.Character.HumanoidRootPart:FindFirstChild("Arm"):Destroy()
end
local motor6D = Instance.new("Motor6D")
motor6D.Part0 = data.target.HumanoidRootPart
motor6D.Part1 = plr.Character.HumanoidRootPart
motor6D.C1 = CFrame.new(-1.5, 4, 1) * CFrame.Angles(0, math.rad(-180), 0)
motor6D.Parent = plr.Character.HumanoidRootPart
end)
end
[this code is a placeholder and it misses key features such as detecting if the killer is holding a player already or not]
It works but the process of picking up the player isn’t as smooth.