I made this system where the game makes every character limb that isn’t the arms go locally transparent, but when testing, only the arms really cast a shadow. How can I make them transparent while still casting shadows? Help appreciated!!
(below my code and image with the shadows currently cast)
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") and (v.Name == "Right Arm" or v.Name == "Left Arm") then
v.LocalTransparencyModifier = v.Transparency
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
v.LocalTransparencyModifier = v.Transparency
end)
end
end
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local function connectChild(v)
if v:IsA("BasePart") and (v.Name == "Right Arm" or v.Name == "Left Arm") then
v.LocalTransparencyModifier = v.Transparency
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
v.LocalTransparencyModifier = v.Transparency
end)
end
end
for i, v in char:GetChildren() do
connectChild(v)
end
char.ChildAdded:Connect(connectChild)