RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script that makes you move to the most close player using path finding"
-- server script local pfs = game:GetService("PathfindingService") game.Players.PlayerAdded:Connect(function(player) local closestPlayer = game.Players:GetClosestPlayer(player.Character.HumanoidRootPart.Position) local path = pfs:CreatePath() path:ComputeAsync(player.Character.HumanoidRootPart.Position, closestPlayer.Character.HumanoidRootPart.Position) for _, waypoint in pairs(path:GetWaypoints()) do player.Character.Humanoid:MoveTo(waypoint.Position) player.Character.Humanoid.MoveToFinished:Wait() end end)