|
| 11 Aug 2016 09:34 AM |
Hello! I have a problem with a TextButton. I have a TextButton script that fades out an ImageLabel when you click it. But, whenever I try to make the TextButton to a new position, it moves the image too. Here's the script:
function onClicked () for i = 0, 1, .1 do script.Parent.Picture.ImageTransparency=i wait(.05) end script.Parent.Start:Remove() script.Parent.Picture:Remove() script.Parent.Parent.Parent:Destroy () end
script.Parent.MouseButton1Click:connect(onClicked)
|
|
|
| Report Abuse |
|
|
|
| 11 Aug 2016 09:42 AM |
Dont make the image a child of the TextButton Change its location to Maybe just inside the ScreenGui not the TextButton
|
|
|
| Report Abuse |
|
|
|
| 11 Aug 2016 09:56 AM |
| I tried that but it says picture is not a valid member of text button |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2016 10:02 AM |
Yes it says that because you moved it... So now you change the script.Parent.Picture.ImageTransparency=i accordingly to where the picture is.
|
|
|
| Report Abuse |
|
|