Start typing to search packages!
Transparency
Sets the transparency of an instance and all of its descendants together, while remembering each object's original transparency.
On creation it caches the transparency properties of the target and its descendants. Set then scales every cached value between its original and fully transparent.
Usage
local Transparency = require(path.to.Transparency)
local transparency = Transparency.new(workspace.Model)
transparency:Set(0.5) -- half faded from the original values
transparency:Set(1) -- fully transparent
transparency:Set(0) -- back to the original values
transparency:Destroy()
Supported classes
Frame, ImageLabel, ImageButton, TextLabel, TextButton, TextBox, ViewportFrame, UIStroke, Beam, Part, MeshPart, and ParticleEmitter. Other classes in the tree are left untouched.
API
Transparency.new(targetObject)
Caches the transparency properties of the target and its descendants and returns a new object.
Transparency:Set(transparency)
Applies a transparency from 0 to 1 across every cached object, where 0 keeps the original values and 1 is fully transparent.
Transparency:Exempt(exemptedObject)
Restores the object and its descendants to their original values and stops tracking them, so later Set calls no longer affect them.
Transparency:UpdateDefaults(object, ignoreDescendants)
Reads the current transparency of the object as its new default. Pass true for ignoreDescendants to update only the object itself.
Transparency:Destroy()
Clears the cache. Objects keep their current transparency.
Package Details
Install command (Click to copy)
Version
1.0.1
License
MIT
Safe for commercial use
Automated license review — not legal advice.
