Okay so everything works here except one thing the transparency thing I already put a spawn looop there to try and make it work. It works but like every time it loops it just gets faster for some reason and the transparency loops faster and I dont know why. how would I go about making a transparency loop along with all the other loops?

local screengui = script.Parent
local frame = screengui.FrameUsingTwene
local rs = game:GetService("RunService")

while wait() do
    frameclone = frame:Clone()
    frameclone.Parent = screengui
    frameclone.Position = frame.Position

    frameclone:TweenSize(UDim2.new(1,0,1,0),'In','Linear',1,false)
    
    spawn(function()
    
	    while rs.RenderStepped:Wait() do
    
		    frameclone.Transparency = frameclone.Transparency + 0.1
    
	    end
    
    end)
    
   wait(.5)
    
   frameclone:Destroy()
    
      
    
   end
    
      
    
    frameclone:GetPropertyChangedSignal('BackgroundTransparency'):Connect(function()
    
    if frameclone.BackgroundTransparency >= 1 then
    
    frameclone:Destroy()
    
    end
    
    end)

1 comment

0

Don't use while wait() do idiom, it's bad practice because it only works due to a hack; a trick. And don't use spawn, use coroutines, and you need to indent your code. You have ZERO excuse for not indenting. Your code needs to be restructured entirely.