Gaps between paths

Hello developers!

I made generating paths function which are moving. I found an issue, when it’s paths moves too fast then there is gaps between paths.

I think, It’s moving function problem so here is script:

function paths.movePaths(pathType)
	for i, parts in pairs(pathType:GetChildren()) do
		local BodyVelocity = Instance.new("BodyVelocity")
		BodyVelocity.Velocity = Vector3.new(0,0, -14)
		BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
		BodyVelocity.Parent = parts

		local BodyGyro = Instance.new("BodyGyro")
		BodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
		BodyGyro.Parent = parts
		
		PhysicService:SetPartCollisionGroup(parts, "Path")
		parts.Anchored = false
	end
end

I was experiencing with moving BodyVelocity.Velocity = Vector3.new(0,0, -14)

I don’t have any Idea… any help will be cool.

What stops the paths from moving? I’d look at that section of the script.
Also, why not use PrismaticConstraints set to Servo to move the sections?

In my opinion, a more favorable option would be to use TweenService to move them. Then, if you want to move the player with them, “stick” them to the path, you would want to check if they are above it and CFrame their HumanoidRootPart with the platform.

Weld it together using a WeldConstraint. That will fix your issue. Acceleration will show imperfections. By welding it all together makes it so it will be treated as one solid model, making the model not do what you showed us.

PrismaticConstraints do away with having to move the player with a script. They are physics based so players will move on top of them.

Maybe I’ll give you more information.
There are 5 types of paths that are randomized and one is selected to be placed in the Workspace. After it is placed, the function paths.movePaths (pathType) causes these paths to move (player does not move).

Why not just tween the Parts. They stay anchored and move to the exact spot you want them to.
Sample scripts and instructions are here TweenService | Roblox Creator Documentation