local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Camera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer local function createLine() local line = Drawing.new("Line") line.Visible = false line.Color = Color3.new(1, 1, 1) line.Thickness = 1 line.Transparency = 1 return line end local function createSkeleton(player) local lines = {} local connection local R15_Joints = { {"Head", "UpperTorso"}, {"UpperTorso", "LowerTorso"}, {"UpperTorso", "LeftUpperArm"}, {"LeftUpperArm", "LeftLowerArm"}, {"LeftLowerArm", "LeftHand"}, {"UpperTorso", "RightUpperArm"}, {"RightUpperArm", "RightLowerArm"}, {"RightLowerArm", "RightHand"}, {"LowerTorso", "LeftUpperLeg"}, {"LeftUpperLeg", "LeftLowerLeg"}, {"LeftLowerLeg", "LeftFoot"}, {"LowerTorso", "RightUpperLeg"}, {"RightUpperLeg", "RightLowerLeg"}, {"RightLowerLeg", "RightFoot"} } local R6_Joints = { {"Head", "Torso"}, {"Torso", "Left Arm"}, {"Torso", "Right Arm"}, {"Torso", "Left Leg"}, {"Torso", "Right Leg"} } local function getLines(count) for i = #lines + 1, count do lines[i] = createLine() end for i = count + 1, #lines do lines[i].Visible = false end return lines end connection = RunService.RenderStepped:Connect(function() local char = player.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") if char and humanoid then local joints = (humanoid.RigType == Enum.HumanoidRigType.R15) and R15_Joints or R6_Joints local currentLines = getLines(#joints) for i, pair in ipairs(joints) do local p1, p2 = char:FindFirstChild(pair[1]), char:FindFirstChild(pair[2]) if p1 and p2 then local pos1, vis1 = Camera:WorldToViewportPoint(p1.Position) local pos2, vis2 = Camera:WorldToViewportPoint(p2.Position) if vis1 and vis2 then currentLines[i].From = Vector2.new(pos1.X, pos1.Y) currentLines[i].To = Vector2.new(pos2.X, pos2.Y) currentLines[i].Visible = true else currentLines[i].Visible = false end else currentLines[i].Visible = false end end else for _, l in ipairs(lines) do l.Visible = false end end end) player.AncestryChanged:Connect(function(_, parent) if not parent then connection:Disconnect() for _, l in ipairs(lines) do l:Remove() end end end) end for _, p in pairs(Players:GetPlayers()) do if p ~= LocalPlayer then createSkeleton(p) end end Players.PlayerAdded:Connect(createSkeleton)