Привет помоги мне пожалуйста я вот пишу код для своей игры на языке Lua в программе roblox studio я создаю свою игру и там специфическая механика. Короче помоги мне в моей коде для этой игры у меня вылазит ошибка:
14:08:18
[string "V4JtZuq"]:130: Unable to cast Vector2 to Vector3 Stack Begin
Script 'CorePackages. JestGlobals', Line 892
Script '[string "V4JtZuq"]', Line 130 - function GetNearest PlayerToMouse Script '[string "V4JtZuq"]', Line 174
Script 'CorePackages. JestGlobals', Line 605
Stack End


а вот мой сам код:
print("Key to toggle ESP is V.")
print("Aim-key is Left-Alt.")

local ENABLED      = false
local PLAYER       = game.Players.LocalPlayer
local UserInput    = game:GetService("UserInputService")
local CC           = workspace.CurrentCamera
_G.FREE_FOR_ALL   = true
_G.BIND           = Enum.KeyCode.LeftAlt -- Используем Enum для клавиш
_G.AIM_AT         = 'Head'
local esp          = false
local track        = false

-- Функция для создания ESP трекера
local function Create(base, team)
    local bb = Instance.new("BillboardGui")
    bb.Parent = PLAYER:WaitForChild("PlayerGui")
    bb.Adornee = base
    bb.ExtentsOffset = Vector3.new(0, 1, 0)
    bb.AlwaysOnTop = true
    bb.Size = UDim2.new(0, 100, 0, 50)
    bb.StudsOffset = Vector3.new(0, 1, 0)
    bb.Name = "tracker"

    local frame = Instance.new("Frame")
    frame.Parent = bb
    frame.ZIndex = 10
    frame.BackgroundTransparency = 0.7
    frame.Size = UDim2.new(1, 0, 1, 0)
    frame.BackgroundColor3 = team and Color3.new(1, 0, 0) or Color3.new(1, 1, 1) -- Зелёный или красный
    frame.Name = "Frame"

    local txtlbl = Instance.new("TextLabel")
    txtlbl.Parent = bb
    txtlbl.ZIndex = 10
    txtlbl.Text = string.upper(base.Parent.Name)
    txtlbl.BackgroundTransparency = 1
    txtlbl.Position = UDim2.new(0, 0, 0, -35)
    txtlbl.Size = UDim2.new(1, 0, 0, 20)
    txtlbl.Font = Enum.Font.SourceSansBold
    txtlbl.TextSize = 14
    txtlbl.TextStrokeTransparency = 0.5
    txtlbl.TextColor3 = team and Color3.new(0, 1, 0) or (base.Parent.Name == "whitelist kid" or base.Parent.Name == "second whitelist kid here") and Color3.new(0, 1, 0) or (base.Parent.Name == PLAYER.Name and Color3.new(1,1,1) or Color3.new(1, 0, 0))

    local txtlbl2 = Instance.new("TextLabel")
    txtlbl2.Parent = bb
    txtlbl2.ZIndex = 10
    txtlbl2.Text = string.format("HP: %.2f", base.Parent:FindFirstChild("Humanoid") and base.Parent.Humanoid.Health or 0)
    txtlbl2.BackgroundTransparency = 1
    txtlbl2.Position = UDim2.new(0, 0, 0, -25)
    txtlbl2.Size = UDim2.new(1, 0, 0, 20)
    txtlbl2.Font = Enum.Font.SourceSansBold
    txtlbl2.TextSize = 14
    txtlbl2.TextStrokeTransparency = 0.5
    txtlbl2.TextColor3 = team and Color3.new(1, 0, 0) or Color3.new(1, 1, 1)

    if base.Parent.Name == PLAYER.Name then
        txtlbl.Transparency = 1
        txtlbl2.Transparency = 1
        frame.Transparency = 1
    end
end

-- Функция для поиска и отображения ESP
local function Find()
    Clear()
    track = true
    coroutine.wrap(function()
        while track do
            Clear()
            for _,v in pairs(game.Players:GetPlayers()) do
                if v.Character and v.Character:FindFirstChild("Head") then
                    Create(v.Character.Head, v.Team ~= PLAYER.Team)
                end
            end
            wait(1)
        end
    end)()
end

-- Функция для очистки ESP трекеров
function Clear()
    for _,v in pairs(PLAYER:WaitForChild("PlayerGui"):GetChildren()) do
        if v.Name == "tracker" and v:IsA("BillboardGui") then
            v:Destroy()
        end
    end
end

-- Обработка нажатия клавиши V для переключения ESP
UserInput.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.V then
        if not esp then
            Find()
            print("ESP ENABLED")
            esp = true
        else
            Clear()
            track = false
            print("ESP DISABLED")
            esp = false
        end
    end
end)

-- Функция для нахождения ближайшего игрока к мыши
local function GetNearestPlayerToMouse()
    local players = {}
    local player_hold = {}
    local distances = {}

    for _, v in pairs(game.Players:GetPlayers()) do
        if v ~= PLAYER and v.Character and v.Character:FindFirstChild(_G.AIM_AT) then
            if _G.FREE_FOR_ALL or v.Team ~= PLAYER.Team then
                table.insert(players, v)
            end
        end
    end

    for _, v in pairs(players) do
        local aimPart = v.Character:FindFirstChild(_G.AIM_AT)
        if aimPart then
            local distance = (aimPart.Position - CC.CFrame.p).Magnitude
            local raycastParams = RaycastParams.new()
            raycastParams.FilterDescendantsInstances = {workspace}
            raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
            raycastParams.IgnoreWater = true
            local direction = (UserInput:GetMouseLocation() - CC.ViewportSize / 2).Unit * distance
            local raycastResult = workspace:Raycast(CC.CFrame.p, direction, raycastParams)
            if raycastResult then
                local diff = math.floor((raycastResult.Position - aimPart.Position).Magnitude)
                player_hold[v.Name .. tostring(_)] = {dist = distance, plr = v, diff = diff}
                table.insert(distances, diff)
            end
        end
    end

    if #distances == 0 then return false end

    local min_distance = math.min(table.unpack(distances))
    if min_distance > 20 then return false end

    for _, v in pairs(player_hold) do
        if v.diff == min_distance then
            return v.plr
        end
    end

    return false
end

-- Переменные для аимбота
local aimEnabled = false

-- Обработка нажатия и отпускания клавиши для аимбота
UserInput.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == _G.BIND then
        ENABLED = true
    end
end)

UserInput.InputEnded:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == _G.BIND then
        ENABLED = false
    end
end)

-- Цикл аимбота
game:GetService('RunService').RenderStepped:Connect(function()
    if ENABLED then
        local TARGET = GetNearestPlayerToMouse()
        if TARGET and TARGET.Name ~= "Whitelist kid here" and TARGET.Name ~= "second whitelist kid here" then
            local aimPart = TARGET.Character:FindFirstChild(_G.AIM_AT)
            if aimPart then
                CC.CFrame = CFrame.new(CC.CFrame.p, aimPart.Position)
            end
        end
    end
end)