So the problem is trying to make the screen fade to white with this script and when I tried it I did not see any changes on the screen and when I check output it did not give any errors.The script is a local script and the script is the child of the frame and the screen GUI is above that. Which is then located in StarterGui.
local function fade()
for i = 1,0.1,0.1 do
script.Parent.BackgroundTransparency = i
wait(i)
end
end
game.Workspace.Portal_Lv6.Touched:Connect(fade)
So looking at your script, It’ll start at 1, end at 0.1, and increment at a rate of 0.1.
Your problem lies at roblox not continuing for loops if (increment is positive) and end is less then count. or if (increment is negative) and end is greater then the count.
As @LongingBball6805 stated you’ll want to just swap the last number to a negative.
for i = 1, 0.1, -0.1 do
end
I recommend taking a look at TweenService, as it is an easier and optimized way of doing this kind of thing.
I will try for loops again if it does not look good I will use tweenservice
EDIT:It works maybe I need to start double checking my code more often and look for tiny errors like this