MaterialService.Use2022Materials cannot be accessed by scripts or command line even though documentation says you can

Problem

When attempting to script MaterialService.Use2022Materials, the following error occurs: The current thread cannot write 'Use2022Materials' (lacking capability RobloxScript) even through the documentation states that you can. This issue even occurs on the command line when manually typed in. Furthermore, even though the documentation says read parallel, there is no read access. Attempting to even read the property returns the same error.

At this point I’m not sure if it’s a documentation issue or if it’s an engine issue.

In a system that uses multiple maps with different configurations, it is essential to be able to specify which set of materials that should be used when rendering the map in the workspace so the map environment has the intended look.


Additional Information

Parameter Value
Problem Area Engine
Problem Component LUA API
First Noticed 23 Mar 2024
Priority Medium
Impact Medium
Annoyance Level High

The beta features that I have enabled are as follows:

  • AI-Powered Texture Generator
  • Assistant Preview
  • Material Generator
  • Notched Screen Support
  • Notification Overhaul
  • Updated Docking System
  • Updated Roblox Controls

As for plugins, I have a bunch that are installed, but very few are enabled. The ones that are enabled are listed below with links to their details page on the Roblox store website:


Expectations

What I expect to happen is to be able to set this value via script since the documentation says that I can.


Visuals

Output window of Studio

Specific Documentation


Reproduction

Since this also happens on the command line, open Roblox Studio and enter the following commands on the command line:

game.MaterialService.Use2022Materials = true
print(game.MaterialService.Use2022Materials)

4 Likes

Any update on this? There has been radio silence this was posted on Sunday.

You need to be patient, you’re not the only bug report in the forum

I am aware of that. It might have been missed since there was a significant number of posts since I posted this. Usually, it takes a day or two for a bug to be acknowledged by staff. So the bump was a reminder.

1 Like

Hello.
Sorry for the late response.

This is a documentation issue, a label saying ‘Roblox Script Security’ is missing.
We are working to restore that information.

2 Likes

Very well. Are there plans to make this available in the future? Games that use a lobby system that’s in a separate place from the game field would benefit from this. If not, that’s fine. I can use MaterialVariant to define and use the old materials.

1 Like

Hi @Maelstorm_1973 thank you for your bug report. This was indeed a documentation issue. We have restored the security tags on the Documentation site as of today.

MaterialService.Use2022Materials now has the “Roblox Script Security” label, which indicates that it is only accessible in Core Scripts.

I’ll close out this report and marking it as Fixed. Thank you for your contribution!