So, for practice, I am making a loading screen script. I’m a fairly new scripter so I’m not good at scripting yet, I just know the basics. In the script, I am trying to make it start from number 1 and then go to 100. There’s a bar at the bottom too with color, so it turns a bit bluer at each number.
The problem with the script is that it will not close after it is done. The code “script.Parent.Parent.Parent:Destroy()”
I added should have destroyed the script’s parent’s parent’s parent (which is the screenGUI) but it didn’t, and it just stayed at the screen.
You’re adding 0.8 each time it loops and Roblox only goes until 1. So the background transparency reaches 0.96 at the max. I don’t think it would go over since 1 is the max. Could you try using something like 5 or 10.
Have you checked to make sure the BackgroundTransparency has reached 1? Since looking back at the picture, nothing there is truly 100% Transparent. Unless it’s something else…?
How about instead of the if statement detecting BackgroundTransparency, it detects if the BarProgress variable is equal to 100? I think that’s a more reliable way of checking if the screen is complete rather than checking the transparency.