Making turret look at mouse but not up/down

How could i make it so that this turret look at your mouse but not up or down, only turning around?

Code (local):

local run = game:GetService("RunService")
local mouse = game.Players.LocalPlayer:GetMouse()

	script.Floor.Value.CFrame = CFrame.lookAt(script.Floor.Value.Position,,mouse.Hit.Position.Y,mouse.Hit.Position.Z))

This post should help for the method, however since it’s not working with C0 you can avoid the relativeToWorld CFrame which is the Part0 CFrame inversed.

local origin =,5,0)
local lookat =,0,5)

part.CFrame = CFrame.lookAt(origin,,origin.Y,lookat.Z))

Edit : Im pretty sure .RenderStepped is faster than .Heartbeat, as .RenderStepped is basically every frame.

Edit 2 : Actually, I just realized theres a better way. I believe this should work.

local origin = turret
local lookat = mouse.Hit -- .Hit is a CFrame

Part.CFrame = CFrame.lookAt(origin.Position,lookat.Position,lookat.UpVector)

‌‌‌‌‌‌i‌‌‌ ‌‌‌l‌‌‌o‌‌‌‌v‌‌‌e‌‌ y‌‌‌‌‌‌o‌‌‌‌u‌‌‌