so i have a character that goes along a path using Humanoid:MoveTo and this path has turns
now what i would want to do is have a part that is constantly like 10 studs away from him
so ive tried something like this:
while true do
task.wait()
part.Position = char.Position + Vector3.new(0,0,10)
end
now this obviously works, however when the character makes a 90 degree turn, the part is now following on the wrong axis, aka the part doesnt turn with the character
CFrame is both position and orientation (by that way just in case you didn’t know if you’re adding a position to a CFrame you have to add it with a Vector3).
Edit: Character models don’t have a position (it has a Origin Position but that’s besides the point).
so when character begins walking it should be: Vector3.new(0,0,10)
but when he turns 90 degrees that would have to be Vector3.new(10,0,0)
part needs to be in front of the character by 10 studs, which by default is 10 on the z axis, but when he turns that needs be 10 on the x axis because thats how it remains in front