Here the script i tried..
local playergui = game.Players.LocalPlayer.PlayerGui
script.Parent.MouseButton1Click:Connect(function()
game:GetService("ReplicatedStorage").AdultEvent:FireServer()
wait(.01)
script.Parent.Parent.Parent.Parent.Visible = false
local fadingClone = playergui.BlackFadingGui.Frame:Clone()
fadingClone.Parent = playergui.BlackFadingGui
fadingClone.Visible = true
wait(.1)
for loop = 0.01, 15 do
wait (.1)
fadingClone.BackgroundTransparency = loop/5
game:GetService ("RunService"). Stepped:Wait()
wait(0.1)
end
end)

3 comments
Three different wait statements in 1 loop. Why? And the loop counts 0.01, 1.01, 2.01... up to 14.01. What is Transparency of 14.01/5 supposed to be? And why is one of the waits waiting on the physics simulation Stepped event for a UI update? I'm scratching my head trying to figure out how you even came up with this.
i got it from the community just help me fix it, i need it to fade in and out
Since I'm not sure what your Script.Parent's are leading toward it's hard to help you out. Try assigning variables to your objects to make it easier for you to read and understand and come back with code that is easier to read. That way people can actually help you out.