{"id":"stratiz/Transparency","name":"Transparency","scope":"stratiz","platform":"roblox","description":"Object for setting the transparency of an entire instance and its descendants.","version":"1.0.1","latest":"1.0.1","versions":["1.0.0","1.0.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"770f763120f6c5adba947e1682e88de06be143364e07cded5f84d21420ab7606","likes":1,"downloads":4,"install":"forest install stratiz/Transparency","url":"https://forest.dev/p/roblox/stratiz/Transparency","files":"https://api.forest.dev/ai/package/roblox/stratiz/Transparency/files","readme":"# Transparency\n\nSets the transparency of an instance and all of its descendants together, while remembering each object's original transparency.\n\nOn creation it caches the transparency properties of the target and its descendants. `Set` then scales every cached value between its original and fully transparent.\n\n## Usage\n\n```lua\nlocal Transparency = require(path.to.Transparency)\n\nlocal transparency = Transparency.new(workspace.Model)\n\ntransparency:Set(0.5) -- half faded from the original values\ntransparency:Set(1)   -- fully transparent\ntransparency:Set(0)   -- back to the original values\n\ntransparency:Destroy()\n```\n\n## Supported classes\n\nFrame, ImageLabel, ImageButton, TextLabel, TextButton, TextBox, ViewportFrame, UIStroke, Beam, Part, MeshPart, and ParticleEmitter. Other classes in the tree are left untouched.\n\n## API\n\n### Transparency.new(targetObject)\n\nCaches the transparency properties of the target and its descendants and returns a new object.\n\n### Transparency:Set(transparency)\n\nApplies a transparency from 0 to 1 across every cached object, where 0 keeps the original values and 1 is fully transparent.\n\n### Transparency:Exempt(exemptedObject)\n\nRestores the object and its descendants to their original values and stops tracking them, so later `Set` calls no longer affect them.\n\n### Transparency:UpdateDefaults(object, ignoreDescendants)\n\nReads the current transparency of the object as its new default. Pass `true` for `ignoreDescendants` to update only the object itself.\n\n### Transparency:Destroy()\n\nClears the cache. Objects keep their current transparency.\n","readmeTruncated":false}