Привет помоги мне пожалуйста я вот пишу код для своей игры на языке Lua в программе…
- User
Привет помоги мне пожалуйста я вот пишу код для своей игры на языке 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"
codelocal 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 - Assistant