How can i smoothly change the orientation/direction of my part?

Hello, as you can see in the video below, when the platform changes direction, it does abruptly. I would like the rope to change direction naturally. Do you have any idea how I could achieve this from the code I’m posting below? Thanks for your help

while task.wait() do
	for i, Balance in workspace.Balances:GetChildren() do
		local Rotation = Balance.Rotation
		local Config = Balance.Configuration
		if Config.Sens.Value == false then
			if Rotation.Orientation.X < 70 then
				Rotation.CFrame = Rotation.CFrame * CFrame.Angles(math.rad(Config.Speed.Value),0,0)         
			else
				Config.Sens.Value = true  -- Change direction
			end
		else
			if Rotation.Orientation.X > -70 then
				Rotation.CFrame = Rotation.CFrame * CFrame.Angles(math.rad(-Config.Speed.Value),0,0)
			else
				Config.Sens.Value = false -- Change direction
			end
		end
	end
end

You could use the rope constraint and make it unanchored so like swings. But it depends then how would you make it so you swing infinitely how you need or something.

Yes that could probably be a way of achieve it. But i’m more looking about a non physical way to achieve it, just with code. But thanks for the help

1 Like

You could try to slow the movement first, if orientation is between -70 and -80, slow down the speed, reaching 0 slope (no change) at -80. Then increase the speed until -70, run your function from there.

I think i’ll just animate the rotation to fix the issue, thank you