Hey so I want to make my Gui go from 1 transparency to 0 transparency decreasing by .5 everytime.. I have been trying a lot of different things, and this script I'm about to show you was the only one that actually did anything, but it's not working properly, it just keeps the image at 1 transparency..
local a = game.Players.LocalPlayer.PlayerGui.FNMain.Frame.ImageLabel for _ = 0, 1, .1 do a.ImageTransparency = _ end
Add a wait() function to see the fade effect.
local a = game.Players.LocalPlayer.PlayerGui.FNMain.Frame.ImageLabel -- Disappearing image for _ = 1, 10 do a.ImageTransparency = a.ImageTransparency + .1 wait(.1) end -- Reappearing image for _ = 1, 10 do a.ImageTransparency = a.ImageTransparency - .1 wait(.1) end
You can't have the for
command set up like that. As far as I know, you can only use whole numbers. Try something like this. I'm substituting "i" for the "_" you had.
local a = game.Players.LocalPlayer.PlayerGui.FNMain.Frame.ImageLabel for i = 0, 1, do --Keep this at whole numbers. (.1 wouldn't work) a.ImageTransparency = i*.1 --This is where you can change the number to non-whole numbers. end
Anyways, this should work. You didn't have much wrong with the script, just the wrong idea of using it. If you have any problems or questions, please leave a comment below. Hope I helped :P