CastShadow or shadows not working properly

Hello, right now I’m making a wall placement system but I noticed that the CastShadow property is not working on the server and client-side (EVEN IF ITS ENABLED)

This screenshot is from the “server-side” in the test mode, but it gives me the same result from the client-side.

This is my code (I don’t know how this can bug the shadows, but I can’t post this on engine-bugs bc I’m not regular.)

local mainBase ="Part")

mainBase.Parent = workspace
mainBase.Name = "WallObject"
mainBase.Anchored = true
mainBase.TopSurface = Enum.SurfaceType.Smooth
mainBase.BottomSurface = Enum.SurfaceType.Smooth
mainBase.CFrame = origin

mainBase:SetAttribute("Node1", origin.Position)
mainBase:SetAttribute("Node2", destination.Position)

local distance = (destination.Position - origin.Position).Magnitude
mainBase.Size =, 13, distance)
mainBase.CFrame = (CFrame.lookAt(destination.Position, origin.Position) *, 0, -distance/2)) +, (13/2), 0)

Can somebody help me?

Try to restart studio. Should help??

Nop, I got this (basically the same result)

It looks like you’re disabling the shadows on the client side.

Try turning the castshadow property on with the script

No, the picture on the main post is on the server-side and there arent script manipulating the property

There arent scripts manipulating the property

Also, the shadow of parts near to the walls got affected too (I noticed during testing both of my systems but ai cant send pic bc im on mobile)