for i = 1,100 do wait(0.01) script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 0.01 script.Parent.TextTransparency = script.Parent.TextTransparency + 0.01 script.Parent.Parent.Stand.BackgroundTransparency = script.Parent.Parent.Stand.BackgroundTransparency + 0.01 script.Parent.Parent.Stand.TextTransparency = script.Parent.Parent.Stand.TextTransparency + 0.01 script.Parent.Parent.Desc1.TextStrokeTransparency = script.Parent.Parent.Desc1.TextStrokeTransparency + 0.01 script.Parent.Parent.Desc1.TextTransparency = script.Parent.Parent.Desc1.TextTransparency + 0.01 if script.Parent.Parent.StandClass.BackgroundTransparency < 1 then script.Parent.Parent.StandClass.BackgroundTransparency = script.Parent.Parent.StandClass.BackgroundTransparency + 0.01 script.Parent.Parent.StandClass.TextStrokeTransparency = script.Parent.Parent.StandClass.TextStrokeTransparency + 0.01 script.Parent.Parent.StandClass.TextTransparency = script.Parent.Parent.StandClass.TextTransparency + 0.01 end end
For some reason, "StandClass" and "Desc1" turn transparent, but "sit"(which is script.Parent), doesn't turn transparent. I don't know if it is ROBLOX or me, but it doesn't work no matter what I try. Is there something wrong?
You should use variables and functions to shorten your code.
function fade(label, t) label.BackgroundTransparency = t label.TextTransparency = t label.TextStrokeTransparency = t end local label = script.Parent local container = label.Parent for t = 0, 1, 0.03 do -- from 0 to 1 by 0.03 wait(0.03) -- can't wait for 0.01 fade(label, t) fade(container.Stand, t) fade(container.Desc1, t) if container.StandClass.BackgroundTransparency < 1 then -- This if seems redundant since it ought to be true? fade(container.StandClass, t) end end
This should affect them all equally.
Are you sure you aren't misinterpreting which object the not-transparent thing is (e.g., some frame in the background perhaps?)