The current identity (5) cannot ColorMap (lacking permission 3)

Hi
I’m trying to make a plugin that adds a SurfaceAppearance texture to a meshpart when the user clicks a UI button and I keep getting [The current identity (5) cannot ColorMap (lacking permission 3)]
I’ve never got this before and i’m only just adding this feature in (it works with normal textures)
Heres the code snippet

local img = makeFrameTX(v.Name)
	img.Name = tostring(i)
	if v:IsA("Texture") then
		img.Image = v.Texture
	elseif v:IsA("SurfaceAppearance") then
		img.Image = v.ColorMap
	end
	warn("Added Texture with name: "..v.Name)
4 Likes

turn on all the security stuff (HTTPS/third party and stuff) cause plugins often need that.

it’s my plugin, it doesnt require those

1 Like

Still try it just in case cause who knows these days.

I’m 100% sure that’s not the issue cuz those are on lmao

2 Likes

are you doing for i,v in pairs(game:GetDescendants()) do ?
wrap it in a pcall

I was researching this myself as I was making a livery select ui for a game I was working on and found out from the Roblox API reference site that the ColorMap cannot be changed with scripts. (Only the command because thats apparently useful)

Source below

SurfaceAppearance.ColorMap (roblox.com)

1 Like

This is more than likely because the engine is not capable of having it changed during runtime. Also the command bar can do almost all commands so it makes sense why this would be the case.

the engine itself is perfectly capable. if you externally set the property it changes textures perfectly fine. the only problem is it loads an arbitrary texture that’s been loaded somewhere else instead of the texture you provide. there’s no performance issue, which is roblox’s official reasoning for keeping the property hidden in game, rather a coding issue preventing the SurfaceAppearance from loading new textures, which can’t be difficult at all to fix in game considering they did it in studio.

edit: sorry for necroposting, didn’t notice the publish date

1 Like