Item magnet being glitchy

Hello all, I have made a flooring part that, when touched, should give a magnetic effect to the player which attracts all nearby bananas on their banana farm. It does this by making a line force for each banana found and attaching it to one of the attachments on the character rig.

This mostly works just as intended, but after the banana reaches the player, it seems to get violently flung in a random direction. Each banana eventually gets collected, but it doesn’t seem to happen until after it gets flung like this (Each banana has its own script dealing with collisions for the player to collect it).

I have each banana in a collision group that makes them not collide with characters, so my first thought was that the force on the banana approaches infinity as it gets closer to the torso (I have inversesquarelaw as true to have the magnetic effect), so I should make each banana collidable with the character so that it doesn’t go inside of the torso and get a distance of less than 1. This seems to have only made the problem worse, and I really don’t know what to do now. I’m not sure if I’m doing something wrong with the line force or if there is even a real solution to this problem at all, but any solution would be greatly appreciated. Thank you

local DB = false
local magnetizedPlayers = {}
function magnetize(part)
	if part and part.Parent and part.Parent:FindFirstChild("Humanoid") and DB == false then
		local player = game.Players:GetPlayerFromCharacter(part.Parent)
		if player and player.TeamColor == script.Parent.Parent.Parent:GetAttribute("Team") then
			if not magnetizedPlayers[player.Name] then
				DB = true
				for i,v in pairs(script.Parent.Parent.Parent:GetChildren()) do
					if v.Name:match("Banana") then
						local magnet = Instance.new("LineForce") 
						magnet.Attachment0 = v.Attachment
						magnet.Attachment1 = player.Character.UpperTorso.BodyFrontAttachment
						magnet.InverseSquareLaw = true
						magnet.Parent = part.Parent.HumanoidRootPart
						game:GetService("Debris"):AddItem(magnet,30)
					end
				end
				magnetizedPlayers[player.Name] = player
				DB = false
			end
		end
	elseif part and part:FindFirstChild("Eat") and DB == false then
		DB = true
		for i,v in pairs(magnetizedPlayers) do
			if v.Character then
				local magnet = Instance.new("LineForce") 
				magnet.Attachment0 = part.Attachment
				magnet.Attachment1 = v.Character.UpperTorso.BodyFrontAttachment
				magnet.InverseSquareLaw = true
				magnet.Parent = v.Character.HumanoidRootPart
				game:GetService("Debris"):AddItem(magnet,30)
			end
		end
		DB = false
	end
end
script.Parent.Touched:Connect(magnetize)

For those interested, the alignposition constraint worked much better for this purpose because it allows you to put a cap on the velocity.

I wouldn’t use constraints for this case at all. Unless you want them to roll around towards the player, it’d be better to just CFrame them towards the target.

As for your case, they get flung because there is no velocity dampening. You will have to manually limit the velocity, which just goes back to my previous point.

To be clear, you mean manually animate it using lerp? I don’t have much experience with it, but does it take into account a change in the player’s position? I want this to work while the player is moving as well