For a game that I’m working on, I thought about the old Legacy Outlines feature that has been deprecated for years ago. I decided to use the command bar (this can be done in a regular script if you would rather have outlines only in game) and use Roblox’s attributes feature to play around with how I can recreate outlines.
This is the code that I have ran in the command bar (again this can be done in a regular script if you’d like)
if game.Lighting:GetAttribute("LegacyOutlines")==nil then
game.Lighting:SetAttribute("LegacyOutlines",true);
end;
while task.wait()do
if game.Lighting:GetAttribute("LegacyOutlines")==true then
for _,Part in workspace:GetDescendants()do
if Part:IsA("Part")and Part.Shape==Enum.PartType.Block then
if not Part:FindFirstChildOfClass("SpecialMesh")and not Part:FindFirstChildOfClass("BlockMesh")and not Part.Parent:FindFirstChildOfClass("Humanoid")and not Part:FindFirstChild("LegacyOutline")then
local Outline=Instance.new("SelectionBox");
Outline.Parent=Part;
Outline.Color3=Color3.fromRGB(102,102,102);
Outline.LineThickness=0.001;
Outline.Transparency=0.8;
Outline.Name="LegacyOutline";
Outline.Adornee=Part;
end;
end;
end;
else
for _,Part in workspace:GetDescendants()do
if Part:IsA("Part")and Part.Shape==Enum.PartType.Block then
if not Part:FindFirstChildOfClass("SpecialMesh")and not Part:FindFirstChildOfClass("BlockMesh")and not Part.Parent:FindFirstChildOfClass("Humanoid")and Part:FindFirstChild("LegacyOutline")then
Part:FindFirstChild("LegacyOutline"):Destroy();
end;
end;
end;
end;
end;
Keep in mind that running this in the command bar will not rerun next time you open the game and it’s far better to run this in a regular script. But you can run it in the command bar if you want to see the outlines in real time without running the game.
Feel free to use this (I might make a model of this for the toolbox)