Atomic docs

retexture

retexture(assets: number | string | {number | string}, options: {watch: boolean?}?): ()

Replaces the texture on every applicable instance in the place, and masks reads while active, so a script in the game that reads a replaced property gets the value that was there before. Covers Decal, Texture, MeshPart, SpecialMesh, ParticleEmitter, Beam, Trail, ImageLabel, ImageButton, Shirt, Pants, ShirtGraphic and all six faces of a Sky. A SurfaceAppearance cannot be written at runtime, so it is unparented instead and restored on undo. Pass false to stop and restore everything. Use the Image asset id, not the Decal one.

Example

lua
retexture(15853723410)
retexture({ 15853723410, 13472821951 })
retexture(15853723410, { watch = false })
retexture(false)
↑