So for context I am making a Gui that has player mods that is supposed to fade in and out, but the textButtons' background is transparent
1 | local plrMods = script.Parent.Parent.Parent.Frame.PlayerMods |
2 |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | for i = 1 , 100 , 1 do |
5 | plrMods.Jump.TextTransparency = plrMods.Jump.TextTransparency - 1 |
6 | end |
7 | end ) |
On line 5, you made it remove 1 from the transparency, when you should've done 0.1.
Try:
local plrMods = script.Parent.Parent.Parent.Frame.PlayerMods
script.Parent.MouseButton1Click:Connect(function() for i = 1,100,-1 do plrMods.Jump.TextTransparency = plrMods.Jump.TextTransparency - 0.1 end end)
for eazy copy from andarwniceguyjr
1 | local plrMods = script.Parent.Parent.Parent.Frame.PlayerMods |
2 |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | for i = 1 , 100 ,- 1 do |
5 | plrMods.Jump.TextTransparency = plrMods.Jump.TextTransparency - 0.1 |
6 | end |
7 | end ) |
this should work
1 | local plrMods = script.Parent.Parent.Parent.Frame.PlayerMods |
2 |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | for i = 1 , 100 ,- 1 do |
5 | wait() |
6 | plrMods.Jump.TextTransparency = plrMods.Jump.TextTransparency - 0.01 |
7 | end |
8 | end ) |