I have a text button and part of it is covered by another GUI frame. I want to be able to click the frame freely without the button below it activating, but also keep the button active, because some part of it is not covered. How do I do that?
You could make the frame not active so you can’t interact with it.
Could you send a screenshot?
The red thing is the button and it’s stretched all across the white frame. It’s shape is for the sake of tweeting and animations.
If you click the button does it turn dark? Because that’s what happens when you press a textbutton.
That’s how the full animation looks.
I use the remaining part to hide it and I want to interact with the white frame, but the button below makes it hide, when I click.
Once the frame comes out fully you could set the size of the TextButton to just be covered by the frame so you can’t see the end of it. At two seconds in the video it’s fully covered so then you would reduce the size so you can interact with the frame. Then once you press it again put the size back to the original size when you opened it.
Didn’t want to do that, but I worked animation around it and it works. Thanks!
Just set the Active property to false on the TextButton instance in the back.
Alternatively you could just check when the button is clicked if the frame is visible.
local button = script.Parent
local frame = script.Parent.Parent
--change the above references
button.MouseButton1Click:Connect(function()
if frame.Visible then
return
end
--code here will execute if the frame is not currently visible (normal button action)
end)