I’m assuming you are talking about having the character follow your cursor. I’ve done something similar to this in the past and a simple way to do so is something like this on the Y axis:
local yAxis = (Mouse.Hit.Position - Mouse.Origin.Position).Unit.Y
if yAxis > 0.25 then
yAxis = 0.25
elseif yAxis < -0.25 then
yAxis = -0.25
end
if Key.KeyCode == Enum.KeyCode.G and Holding == false then
Holding = true
local Gyro = Instance.new("BodyGyro")
Gyro.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
Gyro.P = 200000000
Gyro.CFrame = CFrame.new(HRP.Position,Mouse.Hit.p)
Gyro.Parent = HRP
while Holding == true do
local yAxis = (Mouse.Hit.Position - Mouse.Origin.Position).Unit.Y
if yAxis > 0.25 then
yAxis = 0.25
elseif yAxis < -0.25 then
yAxis = -0.25
end
Gyro.CFrame = CFrame.new(HRP.Position,Mouse.Hit.p) * CFrame.Angles(0, yAxis, 0)
wait()
if Holding == false then
Gyro:Destroy()
end
end
end