I’m trying to make my part’s posistion the same as my HumanoidRoot Part but just 5 studs infront. I need to also add this with a lookVector so the part is:
5 studs infront of me.
always facing the same way as my HumanoidRootPart; if I look diagonally left, the part is also facing that same way (while still 5 studs infront of me).
My Code (that doesn’t work):
Part.Position = Vector3.new(Character.Torso.Position.X, Character.Torso.Position.Y, Character.HumanoidRootPart.lookVector -5)
Help is appreciated, THX!!!
CZXPEK
(czo)
May 7, 2024, 1:37am
#2
Part.CFrame = HumanoidRootPart.CFrame + HumanoidRootPart.CFrame.LookVector * Vector3.new(5, 0, 5)
1 Like
Thx for replying!!! It sort-of works now, but there’s this problem when I look the other way:
Here’s the full code for the Part’s Orientation and Position (your code is implemented):
Part.CFrame = Character.HumanoidRootPart.CFrame + Character.HumanoidRootPart.CFrame.LookVector * Vector3.new(5, 0, 5)
Part.Orientation = Vector3.new(Character.HumanoidRootPart.Orientation.X, Character.HumanoidRootPart.Rotation.Y, Character.HumanoidRootPart.Orientation.Z)
NVMM!!! SORRY! I realized i didn’t even need the orientation part ;-; TYSM
system
(system)
Closed
May 21, 2024, 1:47am
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.