Lighting.GetSunDirection is not safe to call in parallel

Trying to call Lighting.GetSunDirection during the parallel phase of script execution causes error Function Lighting.GetSunDirection is not safe to call in parallel, which is unexpected given that this function shouldn’t be doing anything unsafe.

This place file has one Actor in workspace that causes the error:
GetSunDirection not parallel safe error.rbxl (53.5 KB)

2 Likes

Found someone at Roblox to check this out! Thanks for the report.

2 Likes

It seems the rbxl file is no longer available? Could you please reupload it, maybe it’s cause of the spaces in the filename, so maybe something like parallel_safe_error.rbxl might help.

@Shirovian

2 Likes

Apologies for the delay, here:
GetSunDirection not parallel safe error.rbxl (53.5 KB)

1 Like

The fix should go out in patch 645 or greater. Thanks for the report; please wait until 645 to mark this as the solution.

4 Likes