---
title: "Sfoth playerlock | Universal Roblox Script - ScriptBlox"
description: "Sfoth playerlock for any Roblox game: -- lock onto players when sword fighting"
canonical_url: "https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774"
meta:
  "og:description": "Sfoth playerlock for any Roblox game: -- lock onto players when sword fighting"
  "og:image": "https://scriptblox.com/images/script/7113724-1725124163350.png"
  "og:title": "Sfoth playerlock | Universal Roblox Script - ScriptBlox"
  "twitter:description": "Sfoth playerlock for any Roblox game: -- lock onto players when sword fighting"
  "twitter:image": "https://scriptblox.com/images/script/7113724-1725124163350.png"
  "twitter:title": "Sfoth playerlock | Universal Roblox Script - ScriptBlox"
---

> Index of every page on this site: [llms.txt](https://scriptblox.com/llms.txt)

![Universal Script 📌](https://scriptblox.com/images/script/7113724-1725124163350.png)

# **Sfoth playerlock**

[**Universal Script 📌**](https://scriptblox.com/game/universal)**![districtora9](https://scriptblox.com/images/photo/66c4fd6dd99cd5f67ed0fb2b-1724186063096.jpg) [districtora9](https://scriptblox.com/u/districtora9)First script**

2 years ago

[**Get an executor**](https://scriptblox.com/executors?kind=executor)

Please login to perform these actions:

## **Does it work? **

**No reports yet **

No reports yet. Tried it? Be the first to say.

Also noticed:

## Description

-- lock onto players when sword fighting

## **Updates **

1. Mar 27, 2025

   ****Script edited:**** Create script

[View Raw](https://scriptblox.com/raw/Universal-Script-Sfoth-playerlock-17774)

```
-- Load AkiriUI and AkaliNotif
local AkiriUI = loadstring(game:HttpGet("https://akiri.best/assets/files/gayasf.ui2?key=5y1lxXSfWKhlQkSqhUuFyB8kPp8hsCau"))()
local AkaliNotif = loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/Dynissimo/main/Scripts/AkaliNotif.lua"))()
local Notify = AkaliNotif.Notify

-- Notification
Notify({
    Title = "Meowbucks pussy cat sword fighting playerlock script",
    Text = "Discord meowbucks",
    Duration = 5
})

-- Ensure that the script is executed after all services and players are loaded
local function waitForChild(parent, name)
    return parent:WaitForChild(name, 10) -- Adjust timeout as needed
end

local function safeLoad(func)
    local success, result = xpcall(func, function(err) 
        Notify({
            Title = "Script Error",
            Text = err,
            Duration = 5
        })
    end)
    return success, result
end

-- Lock player onto nearest player
local function getNearestPlayer()
    local myCharacter = game.Players.LocalPlayer.Character
    if not myCharacter or not myCharacter:FindFirstChild("HumanoidRootPart") then
        return nil
    end

    local nearestPlayer = nil
    local shortestDistance = math.huge
    for _, player in ipairs(game.Players:GetPlayers()) do
        if player ~= game.Players.LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
            local distance = (myCharacter.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude


```

## **Comments **

**1**

Log in to join the conversation. [**Login **](https://scriptblox.com/login?redirect=/script/Universal-Script-Sfoth-playerlock-17774)

![ROTATOR6005's profile picture](https://scriptblox.com/images/user-default.webp)

[**ROTATOR6005**](https://scriptblox.com/u/ROTATOR6005)10 months ago

and how to enable and disable it?

1

```json
{"@context":"https://schema.org","@type":"SoftwareSourceCode","@id":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774#script","url":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774","name":"Sfoth playerlock","programmingLanguage":"Lua","runtimePlatform":"Roblox","author":{"@type":"Person","name":"districtora9","url":"https://scriptblox.com/u/districtora9"},"datePublished":"2024-08-31T17:09:23.404Z","image":"https://scriptblox.com/images/script/7113724-1725124163350.png","isAccessibleForFree":true}
```

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scriptblox.com/#website","@type":"WebSite","description":"Search free Roblox scripts uploaded by the community, with live status for every major executor. Browse by game, copy the loadstring and run it in your executor.","inLanguage":"en","name":"ScriptBlox","url":"https://scriptblox.com/"},{"@id":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774#webpage","@type":"WebPage","description":"Sfoth playerlock for any Roblox game: -- lock onto players when sword fighting","name":"Sfoth playerlock | Universal Roblox Script - ScriptBlox","url":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774","breadcrumb":{"@id":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774#breadcrumb"},"isPartOf":{"@id":"https://scriptblox.com/#website"},"mainEntity":{"@id":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774#script"},"potentialAction":[{"@type":"ReadAction","target":["https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774"]}]},{"@id":"https://scriptblox.com/script/Universal-Script-Sfoth-playerlock-17774#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://scriptblox.com","position":1},{"@type":"ListItem","name":"Universal","item":"https://scriptblox.com/game/universal","position":2},{"@type":"ListItem","name":"Sfoth playerlock","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://scriptblox.com/sitemap.md) for all pages.
