SurfaceAppearence through a script

Im working on a system where my code reads:

local surf = Instance.new("SurfaceAppearance")
surf.Parent = script.Parent.MeshPart1
surf.ColorMap = "rbxassetid://8013077396"
surf.MetalnessMap = "rbxassetid://8013071102"
surf.NormalMap = "rbxassetid://8013067444"
surf.RoughnessMap = "rbxassetid://8013070034"

but errors

The current identity (2) cannot ColorMap (lacking permission 1) 

SurfaceAppearance members aren’t accessible to regular scripts. You can see their security context on the API page. They’re accessible by plugins.

1 Like