Tracking object

You can write your topic however you want, but you need to answer these questions:

  1. I want to track a object while the X orientation is 0 with Lerps and CFrames

  2. The x orientation keeps on changing

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

while true do
	local target = script.Parent.Parent.Target
	local locked = script.Parent.Parent.Locked
	local part1 = script.Parent
	if target.Value then
		for i = 0,1,0.1 do
			part1.CFrame = part1.CFrame:Lerp(CFrame.lookAt(part1.Position, target.Value.Position), i)
			wait()
		end
		locked.Value = true
	end
	wait()
end

Model.rbxm (91.9 KB)

1 Like

Dont Change the X Axis then

Vector3.new(part1.Position.X, target.Value.Position.Y, target.Value.Position.Z)

(Assuming thats how that works)

And where should I use that the strip of code you gave be doesn’t really look that working I would say plus im using CFrame

it got worse