Im having trouble with vectorToObjectSpace

Hello. Im trying to make a part move in the direction its facing using vectorToObjectSpace but it seems to be moving in some arbitrary direction. Any help would be greatly appreciated.

while wait() do
script.Parent.Position += script.Parent.CFrame:vectorToObjectSpace(Vector3.new(4, 0, 0))
end

:PivotTo might be what you’re looking for.

you can move the part by simply using :GetPivot and multiplying it by x cframes.

example shown in the article:

	local currentPivot = character:GetPivot()
	character:PivotTo(currentPivot * CFrame.new(0, 0, -10))

Can u just use CFrame.LookVector?

while wait() do
script.Parent.CFrame = script.Parent.CFrame + script.Parent.CFrame 
end

Thank you so much. That solution worked perfectly for what Im doing.