How can I make this tween not crash the server?

So I made an SCP which basically follows you but I did it with a tween because its easier as it can follow you anywhere and you can set the speed it moves at, problem being is after following 1 player or even being active the entire script just lags the server to the point where you have delete it and im not sure how to fix it.

What Im doing here is getting 1 player in its target range to follow and once that player dies anyone in the detector block gets targeted

local tweenService = game:GetService("TweenService")


function Move606(Torso)
	
	local SCP = script.Parent.Parent["606"]
	
	local WallMove = {CFrame = Torso.CFrame}
	
	local Info = TweenInfo.new(0.9)
	
	tweenService:Create(SCP, Info, WallMove):Play()
end



script.Parent.Touched:Connect(function(player)
	if player.Name == "UpperTorso" then
	local name = player.Parent.Name
	
	local magnitude = 0
	while magnitude <= 200 do
							
		local magnitude = (script.Parent.Parent["606"].Position - player.Position).Magnitude
		if magnitude <= 85 then
				Move606(player)
				if player.Parent.Humanoid.Health == 0 then
					break
				end
				wait(1)
		end
		end
	end
end)
1 Like

I’m pretty sure that using TweenService is the problem, a better solution would be to take the time to learn how to use ROBLOX’s PathfindingService. There are plenty of tutorials out there, that explain how to use this. And, it has the plus side of including animations

1 Like

Tweens are used for Objects, not Characters I suggest using PathfindingService for your issue, it’s doesn’t have lag and it doesn’t get stuck in a wall when following you. Good luck!

1 Like

I don’t need to use pathfinding for simple reason because Its a ball that should follow you and not a humanoid instance

If you want the problem solved, then just duplicate the sphere, have it be anchored and transparent, and use it as the HumanoidRootPart. It’s the best solution, and is far better than using TweenService