How to Make the Player's Legs face the Move Direction

I know that this has been done before. Most of those are confusing and/or don’t work anymore (thanks, Roblox!)

I’m trying to achieve an effect like DOORS where when the player presses the A and D keys (I know UserInputService could help that factor) the player’s legs face either left or right accordingly. A post a while back by @Moonmonger was answered and worked for a while, but in recent testing, I’ve noticed it causes the player’s legs to face different directions. So, how can I achieve this effect?

Can you show an example of the effect you want to achieve?

1 Like


Notice how when I press the A and S keys to move sideways, the legs also move sideways? That’s what I’m trying to achieve.

local userInputs = UserInputService
local leftLeg = script.Parent:FindFirstChild("Left Leg")
local rightLeg = script.Parent:FindFirstChild("Right Leg")

local function onKeyDown(key)
  if key.KeyCode == Enum.KeyCode.A then
    -- Rotate left leg inwards, right leg outwards
  elseif key.KeyCode == Enum.KeyCode.D then
    -- Rotate left leg outwards, right leg inwards
  end
end

userInputs.InputBegan:Connect(onKeyDown)

I already knew that part, I was asking for the leg movement.

Yeah that guy is using ChatGPT on like every post today

2 Likes