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)
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.
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).