A CFrame value has a LookVector property that returns the front face of the CFrame value.
You can use this property and multiply this by a number (in studs, whether it be negative or positive), and then increase it by a Vector3 in order to offset the CFrame. It's pretty cool.
Here's an example:
workspace.xd.CFrame = CFrame.new(workspace.xd.CFrame.LookVector*-5 + workspace.xd.Position) * CFrame.Angles(workspace.xd.CFrame:toEulerAnglesXYZ())
You can use this on the HumanoidRootPart to set a player back 5 studs.
Note that using the Position property on the a part breaks all joints related to the part and makes the part fall if not anchored. Do not use this on major body parts such as the head or torso, as this will eliminate the player.
2 comments
Instance:FindFirstChild(string name) not Instance:FindFirstChild:(string name). Also, is "move back" here walking back or teleporting back?
oh i know abt the findfirstchild thingy but i mean teleport back