Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make the player face the same way as the camera without facing up and down?

Asked by 3 years ago
Edited 3 years ago

hey so I want the player to face the same way the camera is faceing so its working just fine but how do I make it to not face in the up and down direction here is what I got

local Camera = workspace. CurrentCamera 
local HumanoidRootPart = game.Players.localPlayer.character.HumanoidRootPart

Camera.Changed:Connect(function(changed)
    HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position, Camera.CFrame.LookVector  * 100000)
end)
0
CFrame.fromMatrix(HumanoidRootPart.Position,Camera.CFrame.XVector,Camera.CFrame.YVector) should work, probably. RAFA1608 543 — 3y

Answer this question