MaterialVariant.ColorMap cannot be accessed from scripts even though the documentation says that you can

Problem

In a nutshell, certain properties of MaterialVariant cannot be accessed from scripts even though the documentation says that you can. Furthermore, another class which has the same set of properties, SurfaceAppearance which has the same properties also has the same issue. I’m not sure if this is a documentation issue or an engine issue. However, I suspect this is an engine issue since the documentation was changed to say that they could be accessed from scripts but the engine was not modified to reflect the change. The properties are specified in the following list:

  • ColorMap
  • NormalMap
  • RoughnessMap
  • MetalnessMap

I also wish to point out that @neutrinostack has already confirmed this issue in this post and recommended that I issue a new bug report based on the specific issue that I encountered.


Additional Information

Parameter Value
Problem Area Engine
Problem Component LuaU API
First Noticed 9 Mar 2024
Priority Normal
Impact Medium
Annoyance Level Medium

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:

This is related to another bug report: Being able to change ColorMap in Surface Appearance during runtime despite the API saying you can’t and a feature request: Allow read access to texture properties in SurfaceAppearance and MaterialVariant


Expectations

What I expect to happen is that the documentation match engine functionality.


Visuals

Output window showing the script error.

Documentation showing that this can be accessed from scripts.


Reproduction

To reproduce the issue, perform the following steps:

  1. Load the attached file into Roblox Studio.
  2. Run it.
  3. Observe the results.

Files

Engine - MaterialVariant.ColorMap Access.rbxl (53.1 KB)

1 Like

Thank you for the report.

The property can only be accessed from Plugin scripts.

We are working to restore missing “Plugin Security” and “Roblox Script Security” labels in the documentation.

Are there any plans to make this available for normal scripts in the future? Programs that collect and aggregate asset ids for client preloading operations would benefit from this, even if it’s just read only. If you look at the feature request, when the server spins up, I have software that scans the various folders/services looking for various asset ids.

Hi @Maelstorm_1973 we have restored the security tags on the Documentation site.

MaterialVariant.ColorMap now has the “Plugin Security” label, which indicates that it is accessible only through the command bar and plugins only.

This fix has also been carried out to all other affected API pages.

Thank you so much for your contribution!

1 Like