Lighting shadows flickering when using renderstepped code with intense calculations

What’s happening
I’ve noticed recently that upon running intense calculations inside of a RunService RenderStepped / BindToRenderStepped, the lighting shadows from ShadowMap or Future flicker intensely. This is not a problem as far as i can tell for voxel or compatability. This is a very serious issue for me as it completely ruins the user experience and the level design.

This shouldn’t be happening as I’m pretty sure the code I am running is not that intensive to the extent that the lighting engine skips shadow frames.

It seems to be most common when using raycasting calculations as in my game there is a weapon that uses raycasts every frame, and this issue used to only occur when that weapon was being used. Now i fire raycasts every frame regardless to check for wall obstructions and the issue happens a lot more frequently.

This issue happens in both Studio and Player, including Windows 10 version and the android app. This is not a graphics driver issue as I updated my drivers earlier and the issue still persists. This happens on both my desktop and my laptop as well so I believe it to be engine-side.

Place link
Here is the affected place:

To reproduce, make sure you are in first person, go to the very dark shadow (see video) and hold right click on the mouse.

Video of Problem
Here is a video showing the problem. Please be aware the video contains very rapid flashing lights so please do not watch if prone to seizures or you have epilepsy:

  • Note: i have removed the video after seeing this being looked into as i noticed just now it accidentally revealed some personal information. sorry!

This started happening as soon as i added raycast calculations into my renderstepped code. I don’t know when that was exactly but i think was within the last 2 weeks Please note that when I comment out the raycast calls this still happens, so it is not solely caused by raycasting!

I am using an Intel I7 9700k with NVIDIA RTX 2060Super but this seems to be engine specific, not device.

Please let me know if this can be solved!


EDIT: Please go to the script WeaponsAndArms in StarterCharacterScripts and go to line 446 to see the affected runservice binding.


We were able to reproduce your issue. We’ve filed a ticket to our internal database, and we’ll follow up when we have an update!

Thanks for the report!


this doesn’t look like shadows flicker? it looks more like a rapidly flickering light that lights the shadowed area. but we’ll take a look


there is no light source other than the muzzle flash, but i have experienced it with the muzzle flash turned off and also without firing the weapon at all.

1 Like

and @vrtblox Just asking if there is an update on this as this issue is still present in my project and both studio and player are on the latest version? Thanks

sorry nothing specific yet, but this is not forgotten, i’ll update as soon as there’s more info


Can we have an update on this issue? The bug happens for us when we delete 8 parts in a model in workspace and then create them again every render stepped on the client.

Hi @Blokhampster34 and @Born2Script,
We don’t have an update for this bug yet but I was wondering if it would be possible to get a placefile specifically reproducing this issue, please (feel free to send in DM if preferred) :pray:? This would help our engineering team once they are able to start working on this bug.