I’m trying to make a script that makes its parent Frame fade in/fade out when I press the insert key. The problem is that I can only make it fade out but I don’t know how to make it fade back in. I have looked everywhere and I cant seem to find the solution.
This is my script so far
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Insert then
for loop = 1,10 do
wait(0.001)
script.Parent.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end
end
end
end)
maybe you go check on the community tutorial so that something that can help you with a problem. anyway maybe you try look at the video that i showing to you and if it is not work tell me.