local p = script.Parent
local dis = 30

while true do wait()
	for i,v in pairs(game.Players:GetChildren()) do
		if (p.Torso.Position-v.Character.Torso.Position).magnitude <= dis then
			script.Parent.Humanoid:WalkToPart(v.Character.Torso)
			print("Walking")
		end
	end
end

1 comment

0

Umm...what exactly is the problem here? Everything in the script looks fine.