I'm trying to make a fading blindness effect where a black frame over your screen slowly fades away. The way i'm trying to achieve this is with the background transparency of the frame, the code I have for this is shown here:
inviswall = workspace.Hall.InvisWall
blindness = game.StarterGui.ScreenGui.Blindness
function ShowWall()
print("Touched")
inviswallTransparency = 0
print("Wall visible.")
wait(5)
blindness.BackgroundTransparency = 0
wait(5)
print("Unblinding.")
for i = 0, 1, 0.1 do
blindness.BackgroundTransparency = i
end
end)
workspace.Hall.InvisTouch.Touched:Connect(ShowWall)
When I play the game the frame doesn't seem to show. When I walk over the part that runs the function I can see the transparency of the frame changing in explorer but nothing changes in the game.

2 comments
You should also use local variables.
Yes i use them but i just copied and pasted the script above