I've been experimenting with doing this and i have had no luck so far. What i'm trying to do is have an image label on a block change when you press a surface gui text button on one side and change back when you have pressed a surface gui text button on the other side. Kinda like a loop where even if you kept pressing one side it would loop back around but i have no idea where to start on this. I'm 110% i'm very wrong on this script but its all i've been able to come up with.~~~~~~~~~~~~~~~~~ script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.1Image.ImageTransparency = 1 script.Parent.Parent.2Image.ImageTransparency = 0 end) ~~~~~~~~~~~~~~~~~
Your issue is your changing the back to invisible and visible instantly so It's just gonna do nothing. It is working though, It's so fast you can't see it.
Might I Recommend:
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.1Image.ImageTransparency = 1 wait(--[[The time it will be invisible for]] 1) script.Parent.Parent.2Image.ImageTransparency = 0 end)
That code will make it invisible for 1 second.
If you would like it to be a switch then:
local On = false script.Parent.MouseButton1Click:Connect(function() if on == false then script.Parent.Parent.1Image.ImageTransparency = 0 else script.Parent.Parent.1Image.ImageTransparency = 1 end end)
Upvote if this helped!