I want to move the humanoid root part only

I want to move the humanoidrootpart behind the character so the rotation of the character, and the camera is a little offset from the actual character, i’ve tried cframe, and position. It just moves the entire character with the HRP.

1 Like

the thing you need is to manipulate the camera to have a fixed offset

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()

local Camera = workspace.CurrentCamera

local CFoffset = CFrame.new(0, 2, 10) -- camera is 10 studs behind the character and 2 studs high

local function onRenderStep()
	Camera.CFrame = Character:GetPivot() * CFoffset
end

RunService.RenderStepped:Connect(onRenderStep)

EDIT: i changed the offset to positive values

1 Like

that’s not really want i want though, i want it to affect the movement too, im trying to make it similar to a game i play

1 Like

the movement of what?

1 Like

the rotation of the character, i want it to pivot behind the character instead of directly in the middle, and moving the humrp about a stud behind the character is what i want, but it trying to change the cframe just moves the entire character

thats exactly what the code does?

thats because you’re not supposed to move a limb separately from the other

Because characters model does have primary part, so the primary part of the model character by default is HumanoidRootPart.
This is why you moving your model with HumanoidRootPart. Other limbs of the character does not move the character itself

well what can i do to move the humanoid root part without moving the character, because that’s what i need to do

i just edited the code, it was supposed to offset by a positive value, try it now

that doesnt work, and im pretty certain it’s not what i want either

then what are you really looking for?? the code is doing exactly what you want

what is the game that you’re trying to replicate the behavior?

im trying to replicate the movement of dead by daylight, the character pivots around a point behind the character i don’t want to mess with the camera

ah, replace the line Camera.CFrame = Character:GetPivot() * CFoffset with Camera.CFrame = CFrame.new(Character:GetPivot().Position) * CFoffset

(adjust CFoffset as needed)

you have to mess with the camera

this just locks the camera, and i don’t think you have to mess with the camera

i forgot about that, try using Humanoid.CameraOffset instead

oh yeah, that’s pretty much exactly what i wanted, thank you, i just need to tweak the numbers a little

1 Like

Don’t forget to mark it as a solution

1 Like

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