Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How To Disable Accessories Shadow?

I disabled the avatar shadows and now I need to disable accessory shadows. I have tried two things. Neither work:

Heres the first one:

game:GetService("Players").PlayerAdded:Connect(function(Player)
    Player.CharacterAppearanceLoaded:Connect(function(Character)
        for _, v in pairs(Character:GetChildren()) do
            if v:IsA("BasePart") or v:IsA("UnionOperation") or v:IsA ("Accessory") then
                    v.CastShadow = false
                end
            end
        end)
    end)

Here is the second one:

game:GetService("Players").PlayerAdded:Connect(function(Player)
    Player.CharacterAppearanceLoaded:Connect(function(Character)
        for _, v in pairs(Character:GetChildren()) do
if v:IsA("BasePart") or v:IsA("UnionOperation") then v.CastShadow = false elseif v:IsA("Accessory") then v.Handle.CastShadow = false end
            end
        end)
    end)

2 answers

If you trying to do every part in the character, just use char:GetDescendants(), and if you only want accessories, just check if v.Parent is an accessory.

Hope this helps:3

Lighting.GlobalShadows = false -- turn off all shadows

This discussion is preserved as it was. New answers, comments, and votes are closed.