How do I make an invisible part cast a shadow?

I’ve tried to find some ways on the devforum but all of them are outdated, so can someone tell me how I can script it myself?

Many people don’t seem to know that if you set a part’s material to force field and it’s transparency to -math.huge it becomes transparent while still casting shadows. Please note that this does not work with humanoids for some reason.

image

6 Likes

i’m trying to make a part attached to a player invisible while casting a shadow, so do you know any way I could do that?

use the same method provide in the previous message, and just weld it to the character when their character is added

game.Players.PlayerAdded:Connect(function(plr)
       plr.CharacterAdded:Connect(function(char)
              local weld = Instance.new("Weld")
              weld.Part0  = char.PrimaryPart
              weld.Part1 = PART_YOU_WANT_TO_WELD
              weld.Parent = char
       end)
end)

alternatively you can just make a pre-made weld, with a offset or just do that in the script

1 Like

Hi!
I just tested this, and am seeing some odd results.

In our setup, my friend is trying to make a Gobo light. It uses a part to cast a shadow on a spotlight, but the part casting the shadow needs to be transparent so it’s not visible.

On my end, setting the part transparency to -math.huge and using forceField makes it transparent.

However, on my friends end, setting the part transparency to -math.huge and using forceField makes it completely black.

{391B6794-8340-4936-93A7-F0C0838DED69}

It should be noted this happens in play test, team test, and in the actual game.

1 Like