I’m trying to make a part face the player only on the Y axis, came up with this code but the part just remained stationary is not doing anything. There are no errors either.
Here’s my code:
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local LocalArrow = workspace.Arrow
RunService.RenderStepped:Connect(function()
LocalArrow:PivotTo(CFrame.lookAt(LocalArrow.Position, Vector3.new(LocalArrow.Position.X, Character:GetPivot().Position.Y, LocalArrow.Position.Z)))
LocalArrow.CFrame = CFrame.lookAt(LocalArrow.Position, Vector3.new(LocalArrow.Position.X, Character:GetPivot().Position.Y, LocalArrow.Position.Z))
end)
Any help is appreciated