So, I've tried to make a code to make my GUI fade on the click of a text button, here's what I have so far, but it doesn't work, what am I missing?
Script.Parent.MouseButton1Click:connect (function() Script.Parent.Parent.Position.UDim2.new(0+i wait() script.Parent.TextButton.MouseClick:cÂonnect(click) end
I know something is wrong, but can't figure it out, anyone know a solution?
Alright. You said you want your text button to 'fade' away. Im assuming you mean changing the transpareny; but in your example you're changing the position.
local clicked = false local obj = script.Parent -- change to the text button you want's transparency to change script.Parent.MouseButton1Down:connect(function() -- put this script in the button that needs to be clicked if clicked == false then clicked = true for i = 1,100 do obj.BackgroundTransparency = obj.BacgroundTransparency - 0.01 obj.TextTransparency = obj.TextTransparency - 0.01 wait() end end end)