Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make a bodyposition move something behind the player?

I'm trying to make a ghost NPC companion that follows the person around. I am currently trying BodyPositions for this, instead of my original idea, welding. I want the position of the NPC to be slightly above, to the left, and behind the player, and it works, but only when I face a certain direction. I am absolutely terrible at math, so I've got no idea what I should actually try doing.

while on do wait()
	ghostBodyPos.Position = torso.Position +(torso.CFrame.lookVector * -1.7) + Vector3.new(-2,1,0)
end

ghostBodyPos is the BodyPosition, torso is the torso of the player.

Thanks in advance!

1 answer

✓ Accepted answer

you already have a system for the lookvector, so just use that

while on do wait() ghostBodyPos.Position = torso.Position +(torso.CFrame.lookVector * Vector3.new(-2,1,-1.7)) end

This discussion is preserved as it was. New answers, comments, and votes are closed.