Locking position along one aixs?

im trying to use assemblyLinearVelocity to push a part along its local x axis at a constant speed, i cant use tweenservice in this case and i havent found any good answers otherwise basically how can i lock a part on its local z and y axis?

The best answer is to probably just anchor the part & manipulate it’s CFrame.
Then you can use while / for loops to repeatidly manipulate the part’s CFrame.
example:

--// Variables
local part = workspace:WaitForChild('Part')
part.Anchored = true

--// Code
while task.wait() do
	part.CFrame *= CFrame.new(1, 0, 0)
end