Part Trail not working

I have been trying to make a trail from a part but it would never work since it would just spawn the parts somewhere else, but some would spawn.

local model2 = Instance.new("Folder")
model2.Name = "Parts Visualize"
model2.Parent = workspace

local Debris = game:GetService("Debris")

local mathHuge = math.huge

local function CFramePointRightSide(Pos1 ,Pos2)
	local directionToFace = (Pos1 - Pos2).unit
	local worldUp = Vector3.new(0,1,0)
	local zAxisFace = directionToFace:Cross(worldUp)
	local yAxisFace = directionToFace:Cross(zAxisFace)
	return CFrame.fromMatrix(Pos1, directionToFace, yAxisFace, -zAxisFace)
end

model = Instance.new("Folder")
model.Name = "Part Points"
model.Parent = workspace
local mathHuge = math.huge

local function makePoints(oldPos, newPos)
	local Connect = Instance.new("Part", model)
	Connect.Anchored = true
	Connect.CanCollide = false
	Connect.Name = 	("Connect")
	Connect.Shape = Enum.PartType.Cylinder
	Connect.Material = Enum.Material.Neon
	Connect.Color = Color3.fromRGB(218, 0, 5)   
	local Distance = (oldPos - newPos).Magnitude
	Connect.Size = Vector3.new(Distance,0.3,0.3)					--	count_Parts[i + 1]			count_Parts[i + 1])
	Connect.CFrame =  CFramePointRightSide((oldPos + newPos)/2 , newPos) --  * CFrame.new(0,0,-Distance/2)
end



					local startPart = script.Parent.Position
					local endPart = workspace:WaitForChild("Part Pos2")

					local part_Lock = Instance.new("Part")
part_Lock.CanCollide = false
part_Lock.Size = Vector3.new(4,4,4)
part_Lock.Transparency = 0.75
part_Lock.Material = Enum.Material.Neon
part_Lock.Color = Color3.fromRGB(188, 0, 18)
part_Lock.Parent = model2
part_Lock.Position = startPart
part_Lock.Massless = true
part_Lock.Name = ("part Beam")
local propulsion = Instance.new("RocketPropulsion")
propulsion.Parent = part_Lock
propulsion.MaxTorque = Vector3.new(mathHuge,mathHuge,mathHuge)
propulsion.CartoonFactor = 100
propulsion.MaxThrust = 77500
propulsion.MaxSpeed = 30
propulsion.ThrustD = 100
propulsion.ThrustP = 9750
propulsion.TurnD = 275
propulsion.TurnP = 2000
propulsion.Target = endPart
propulsion.TargetOffset = Vector3.new(0,0,0)
propulsion.TargetRadius = 10
propulsion:Fire()
propulsion.ReachedTarget:Connect(function()
	print("Reached")
	Debris:AddItem(propulsion, 0.01)
	Debris:AddItem(model, 30)
	Debris:AddItem(part_Lock, 0.01)
end)

part_Lock:GetPropertyChangedSignal("Position"):Connect(function()
	new_Position = part_Lock.Position
	--if new_Position.X ~= old_Position.X or new_Position.Y ~= old_Position.Y then
	--print(new_Position - old_Position)
	--print(new_Position)
	--Pos_New = new_Position
	--Pos_Old = old_Position
	--end
end)

while wait(0.1) do
	part_Lock.Position = part_Lock.Position + Vector3.new(math.random(-4, 4), math.random(-3,3), math.random(0,0))
	old_Position = part_Lock.Position
	makePoints(old_Position, new_Position)
	--CreatePoints(startPart, part_Lock.Position, 13, model, old_Position, new_Position) 
end

This is the video to see that it sometimes puts parts:

It would randomly spawn most of them in the void and some where it is suppose to be which I am confused why.

trail effect or trail parts???

It is to make a Trail from parts.

Give me a minute i will review the script.

so which part of the script is the trail there??? i don’t see it.

It is the makePoints function.

wait if its the trail why there is
Connect.Shape = Enum.PartType.Cylinder
Connect.Material = Enum.Material.Neon
there… it isn’t even cylinder and neon all I see there are the 4 neon cylinders there… or the 4 neon cylinders are the trails?

can you show me another vid of it?? i will just confirm if im correct

The 4 red cylinders are the trail but it won’t work.

wdym its the trail? pls tell me what kind of trail is it and I thought the 2 red part that suddenly appear are the parts…

They are the parts that is the whole problem the parts sometimes not spawning where it is supposed to be.

i still dont understand… did you try any solutions?? or just position the trail part where the red cube is placed…

I just cframed it where the red cube was.

Here is the video for confirmation.

Anybody help since I do not know why it is spawning in the void. Since I do not know to improve the script anymore since I tried all I can think of.

Anybody, I have tried doing this for 3 days now and I can’t figure something out. Not even one person, this sucks since it is going to take me months to figure out.

try to get every position where ur red cube is and if you get it, place the trail there and do it on loop.

I did do it in a loop and I already got the position.

then add a script on the loop where it adds a part on the position you got.