local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local function applyBox(character) local humanoid = character:WaitForChild("Humanoid", 5) if not humanoid then return end local rigType = humanoid.RigType for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then local shouldBox = false if rigType == Enum.HumanoidRigType.R15 then if part.Name == "Head" or part.Name == "UpperTorso" or part.Name == "LowerTorso" or part.Name == "LeftUpperArm" or part.Name == "LeftLowerArm" or part.Name == "LeftHand" or part.Name == "RightUpperArm" or part.Name == "RightLowerArm" or part.Name == "RightHand" or part.Name == "LeftUpperLeg" or part.Name == "LeftLowerLeg" or part.Name == "LeftFoot" or part.Name == "RightUpperLeg" or part.Name == "RightLowerLeg" or part.Name == "RightFoot" then shouldBox = true end else if part.Name == "Head" or part.Name == "Torso" or part.Name == "Left Arm" or part.Name == "Right Arm" or part.Name == "Left Leg" or part.Name == "Right Leg" then shouldBox = true end end if shouldBox and not part:FindFirstChild("SmartBoxSelection") then local box = Instance.new("SelectionBox") box.Name = "SmartBoxSelection" box.Adornee = part box.Color3 = Color3.fromRGB(255, 0, 0) box.LineThickness = 0.03 box.SurfaceTransparency = 1 pcall(function() box.AlwaysOnTop = true end) box.Parent = part end end end end for _, player in ipairs(Players:GetPlayers()) do if player.Character then task.spawn(function() applyBox(player.Character) end) end player.CharacterAdded:Connect(applyBox) end Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(applyBox) end)