
24.9k Views
806 Executions
Head Aimlock Universal BEST IN FIRST PERSON
Universal Script 📌 2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Locks Players Curser to nearest players head
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local cursorLocked = false
local connection
-- Create and set up the GUI
local gui = Instance.new("ScreenGui")
local textLabel = Instance.new("TextLabel")
gui.Name = "CursorLockGui"
gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
textLabel.Name = "LockStatusLabel"
textLabel.Parent = gui
textLabel.Text = "Cursor Unlocked"
textLabel.Size = UDim2.new(0, 200, 0, 50)
textLabel.Position = UDim2.new(0.5, -100, 0, 0)
textLabel.TextScaled = true
textLabel.BackgroundTransparency = 0.5
textLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
textLabel.Visible = true
-- Function to find the closest player's head
local function findClosestPlayerHead()
local closestPlayer = nil
local closestDistance = math.huge
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
local head = player.Character.Head
local distance = (LocalPlayer.Character.Head.Position - head.Position).Magnitude
if distance < closestDistance then
closestDistance = distance
closestPlayer = head
end
end








yo this one works you right click on mouse to lock on to player and shoot i tested it in a first person shooter
How do I activate it
works (Supports) solara :D
@maxmaster3602 yeah you could put it on a gui
Thanks for your great feedback marv shout i carry this script on maybe a GUI?
Right CLick