In my glass breaking script I need to return a part’s transparency to its original value after “breaking”. I can’t find anything about how to do this.
2 Likes
Store the part’s Transparency
in a variable before the glass breaks.
--e.g.
local oldTransparency = part.Transparency
-- code where glass breaks
2 Likes
part.Transparency
will allow you to get the current value value. the only way to get the old value is to make a variable before you change it and call it like ogTransp
and then when you want to set it back, part.Transparency = ogTransp
2 Likes
Thanks, for some reason I thought that variable would store a reference and not an actual int value lol.
1 Like