Hello. Recently I wanted to recreate dead by daylight. I discovered the way of doing the movement however my problem is that I am not sure how to script it.
Basically what I need is the humanoidrootpart to go about 5-8 studs back from the upper torso position as shown in the image under:
I tried changing the Positions and CFrames of the humanoid rootpart in both global and local but didn’t succeed.
The only way I was able to do it was by moving it with the arrows.
I can’t find a solution neither in the forums nor in youtube or other websites.
Could somebody please help me? Thanks in advance.
just create a fake HumanoidRootPart
and then calculate the offset then apply that new offset to the fake HumanoidRootPart (i dont really know how to explain this)
local function Move(character, studs)
if not (character:FindFirstChild("Humanoid") and character:FindFirstChild("HumanoidRootPart")) then return end
local upperTorso = character:FindFirstChild("UpperTorso")
if upperTorso then
local hrp = character.HumanoidRootPart
hrp.CFrame = upperTorso.CFrame * CFrame.new(0,0,studs)
end
end
You will pass the character model, and how many studs to move.
i think the script didnt work because you cant seperate Humanoidrootpart from the body (if you try to teleport the humanoidrootpart, your character get teleport too)
If you want camera to be focused just behind the player instead on the player itself then that is the way to do it. You cant move HumanoidRootPart without moving the entire player.
In case you’re still wondering, put the following into StartCharacterScripts. Of course changing the hrp’s CFrame once doesn’t do anything for two reasons: 1) did it only once 2) Moving the RP moves the torso withit.
wait(2)
local Ch = script.Parent
local ChLT = Ch:WaitForChild("LowerTorso") :: BasePart
local Root = ChLT:FindFirstChildWhichIsA("Motor6D")
Ch.PrimaryPart.Transparency = 0
Root.C0 = CFrame.new(0,-1,-6)