Get Convert To Shadow here: https://www.roblox.com/library/72083848011269/
Forgot to show but to unshadow it you just hit the plugin button again!
Not all but majority of materials are supported, some like neon, glass might not work until i find a way to shadow them.
Not sure of the full use cases of this but i guess custom shadows mainly? maybe some builders can get creative using this!.
SOURCE: (I WOULD RECOMMEND NOT USING THE SOURCE IF U PLAN ON GETTING UPDATES!)
--[[
CONVERT TO SHADOW! - Plugin scripted by Scream (scr.eam on DC)
Currently some materials are unsupported until i find a way to shadow them,
I know that I'm using some deprecated code, i can never find myself ending my code with
a double end it triggers me in a way that I can hardly explain hopefully someone in the world relates.
]]
--// Services
local Selection = game:GetService("Selection")
--// Variables
local Toolbar = plugin:CreateToolbar(
"Shadow Maker"
)
local Button = Toolbar:CreateButton(
"Convert To Shadow",
"Converts the selected part or model into just a shadow if it has one.",
"rbxassetid://219103757"
)
local BlacklistedTypes, BlacklistedMaterials = {
"LocalScript",
"Script",
}, {
Enum.Material.Glass,
Enum.Material.Neon
}
--// Plugin
local function ShadowObject(_, Object)
local CanShadowObject = pcall(function() _ = Object.Transparency end)
if not CanShadowObject then return end
local Shadowed = Object:GetAttribute("IsShadowed")
if Shadowed then
Object.Transparency = Shadowed
Object:SetAttribute("IsShadowed", nil)
return
end
local HasMaterial = pcall(function() _ = Object.Material end)
if HasMaterial and table.find(BlacklistedMaterials, Object.Material) then
Object:SetAttribute("IsShadowed", Object.Transparency)
Object.Transparency = 1
return
end
Object:SetAttribute("IsShadowed", Object.Transparency)
Object.Transparency = math.huge
end
local function ShadowMain(_, Object)
if table.find(BlacklistedTypes, Object.ClassName) then return end
local ShadowHighlight = Object:FindFirstChild("ShadowHighlight")
if not ShadowHighlight then
local Highlight = Instance.new("Highlight")
Highlight.Name = "ShadowHighlight"
Highlight.Enabled = false
Highlight.Parent = Object
else
ShadowHighlight:Destroy()
end
for _, Descendant in next, Object:GetDescendants() do
ShadowObject(_, Descendant)
end
ShadowObject(_, Object)
end
Button.Click:Connect(function()
local SelectedInstances = Selection:Get()
table.foreach(SelectedInstances, ShadowMain)
end)