Help with making this

Hello! I am needing help with a project with my friend he needs help with making a godspeed trail that shows a dummy behind the player when they are in godspeed and the dummy sometimes goes in the air can somebody help?

function lookAt(chr,target) --assume chr is a character and target is a brick to look towards
	if chr.PrimaryPart then --just make sure the character's HRP has loaded
		local chrPos=chr.PrimaryPart.Position --get the position of the HRP
		local tPos=target.Position --get the position of the target
		local newCF=CFrame.new(chrPos,tPos) --create our CFrame
		chr:SetPrimaryPartCFrame(newCF) --set the HRP's CFrame to our result, thus moving the character!
	end
end

local PhysService = game:GetService("PhysicsService")

local PlayerGroup = PhysService:CreateCollisionGroup("p")

PhysService:CollisionGroupSetCollidable("p","p",false)

function NoCollide(model)
	for k,v in pairs (model:GetChildren()) do
		if v:IsA"BasePart" then
			PhysService:SetPartCollisionGroup(v,"p")

		end
	end
end



local Debris = game:GetService("Debris")

local Trail = game.ReplicatedStorage["Dummy"] -- Your trail

game.Players.PlayerAdded:Connect(function(Player)  
	
	local char = Player.Character or Player.CharacterAdded:Wait()
	
	repeat wait(0)
		
		

		local charTrail = Trail:Clone() -- Cloned trail

		charTrail.Parent = game.Workspace
		
		NoCollide(charTrail)
		
		local pos = char.HumanoidRootPart.CFrame * CFrame.new(0,0, 4)
		charTrail:MakeJoints()
		charTrail:MoveTo(pos.p)	

		lookAt(charTrail, char.HumanoidRootPart )
		
		Debris:AddItem(charTrail, 0.2)
		
		wait(0.005)

		
	until nil
end)