No errors in either studio or the dev console in client. I can't seem to figure out the problem, all variables are defined, and like I said, nothing errors. Here's the code chunk:
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.F then
for _,v in pairs(player.PlayerGui.Leaderboard:GetChildren()) do
if v.Name:sub(1, 4):lower() == "line" then
if v.Transparency < 1 then
for i = 0, 1, .1 do
wait(.1)
v.Transparency = i
end
else
for i = 0, 1, .1 do
wait(.1)
v.Transparency = v.Transparency - i
end
end
end
end
end
end)

3 comments
Is this a LocalScript, and where is it? I see too many questions like this with the same answer all the time.
Well, why don't you use KeyDown?
@ScriptFusion KeyDown is deprecated. It is recommended to use UIS or CAS.