I made a loading frame that would grow until it hits a specific position. The growing thing is working. But the function load() isnt working at all. The output doesn't say anything. Can someone help me fix this?
lol = 1 for i = 0,89.7 do script.Parent.Scroll.Size = UDim2.new(0, i*10, 0, 65) wait(math.random(0.08,0.54)) end function Load() if script.Parent.Scroll.Size == UDim2.new(0, 897, 0, 65) then lol = script.Parent.Scroll.BackgroundTransparency + .1 lol = script.Parent.BackScroll.BackgroundTransparency + .1 script.Parent.Scroll:Destroy() script.Parent.BackScroll:Destroy() wait(.4) lol = script.Parent.Mystic.ImageTransparency + .1 script.Parent.Mystic:Destroy() end end Load()
lol = script.Parent.Scroll.BackgroundTransparency + .1
This makes lol
equal to the BackgroundTransparency, plus 0.1. lol
is a number. It does not, in any way, tell the computer to change the gui's transparency. Remember, computers only do what you specifically tell them to do.
We just need to edit it like any other variable. We can make the gui's transparency equal the gui's transparency, plus 0.1:
script.Parent.Scroll.BackgroundTransparency = (script.Parent.Scroll.BackgroundTransparency + 0.1) --Parentheses were added for clarity. Don't use them.
Or, if you would like:
lol = script.Parent.Scroll.BackgroundTransparency + .1 script.Parent.Scroll.BackgroundTransparency = lol
will do the same thing. Although I would recommend the first method.