{SOLVED} I need help making my part move to another part

I have three motor6ds in the player’s torso that are attached to a part in the left, right, and middle of the player

When I press “A” the part in the middle should smoothly move towards the part on the left. I tried doing this myself but i got some really weird results

if input.KeyCode == Enum.KeyCode.A then
			heldDownLeft = true
			
			local a = Instance.new("Part")
			a.CanCollide = false
			a.Size = Vector3.new(1,1,1)
			a.Parent = workspace
			a.CFrame = character.HumanoidRootPart.CFrame + Vector3.new(0,-3,0)
			
			local b = character.Torso.b.C1
			
			for progress = 0, 1, 0.03 do
				local left = character.Left.CFrame
				character.Torso.b.C1 = b:lerp(left, progress)
				wait()
			end			
		end
2 Likes

Bump 30char30char30char30char30char

local left = character.Left.CFrame
How are you defining character.Left before this in the code?

sorry for late reply i have a server script that replicates everything into the character

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		for _, part in pairs(parts:GetChildren()) do
			print(part.Name)
			
			local clone = part:Clone()
			clone.Parent = char
			
			weld[plr] = welds:FindFirstChild(part.Name):Clone()
			weld[plr].Parent = char.Torso
			
			weld[plr].Part0 = char.Torso
			weld[plr].Part1 = clone
			
			weld[plr].C0 = welds:FindFirstChild(part.Name).C0
			weld[plr].C1 = welds:FindFirstChild(part.Name).C1
			
			
		end
	end)
end)

left, right and b are inside of my parts folder and their respective motor6ds are named the same

ok i got it fixed I just need it to move towards the c1 of my weld

i replaced this

local left = character.Left.CFrame

with this

local left = character.Torso.Left.C1

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.