:PivotTo() not pivoting player properly

  1. What do you want to achieve? Keep it simple and clear!
    Context: I am making a turn based game. When a player performs their turn, they teleport in front of their target, perform the move and teleport back (using :PivotTo()). The issue I have is that when the player teleports back, they face in a different direction that they were facing before. I want the player to face towards the enemy here.

  2. What is the issue? Include screenshots / videos if possible!
    Here’s what it looks like

when I do the first attack and teleport back, I am facing diagonally, which is what I don’t want

  1. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    I tried using parts to verify I am teleporting correctly
    the blue parts were the character’s original CFrame and the red parts are the CFrame I teleport them to. They face the right direction but my character doesn’t.

The npc doesn’t have this problem so I assume its a player issue, but I can’t find a solution

I don’t want to make it so the character looks at the enemy because I plan to have multiple fighters in the battle, I just want the player to face forward after doing an attack

1 Like

maybe try changing the orientation value of HumanoidRootPart after using :PivotTo?

are you sure that HRP is the default primarypart for the character? roblox defaults it to head for whatever reason

1 Like

this worked, thanks
idk why roblox changed the default primary part to the head

for r6 the primarypart is automatically set to the head so just set the primarypart tot the humanoidrootpart

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