Hello, I want to make the legs of the player look where he is moving like the game Write a letter or even evade. i tried to do this and it work but it’s a bit messed up if anyone with a big brain can help me it will be very nice ! example: Test - YouTube
local LeftLeg = script.Parent:WaitForChild('Torso'):WaitForChild('Left Hip')
local RightLeg = script.Parent:WaitForChild('Torso'):WaitForChild('Right Hip')
local CenterOfLegs = Vector3.new(0,-1,0)
local character = script.Parent
local cam = workspace.CurrentCamera
local humanoid = character:WaitForChild("Humanoid")
while wait(0.001) do
movementDirection = cam.CFrame:vectorToObjectSpace(humanoid.MoveDirection).Unit
LeftLeg.C0 = CFrame.new(CenterOfLegs) * CFrame.new(movementDirection)--messed up part
RightLeg.C0 = CFrame.new(CenterOfLegs) * CFrame.new(movementDirection)--messed up part
end
i already have a script that use 8 animations for the strafing. but it’s not as smooth as the CFrame. the video is a bit laggy im sorry but you can try the game here Write a Letter 🎙️ VC - Roblox you will see they use Cframe.( well i think they do)
Ive never tried it myself, but it stands to reason that it should be doable.
Lets take for example: You have an animation for each of these directions - represented by the arrows - in this illustration. You play one animation when walking forward, and one animation when walking left
You could also theoretically get the animation for the 45 degree direction (blue arrow) by playing each of the two animations at 50% weight rather than just playing one or the other