Basically, I have a loop that is supposed to get the contents of a TextButton
(while the contents are ImageLabel
s), but the problem is, how would I activate them? For example, take the EmotesMenu
from Roblox. They use the same hierarchy. Here’s my explorer: (Blue A
is TextButton
and Green images are ImageLabel
s)
How would I do that if I click on one of the ImageLabel
s, something happens?
Is there any other way than making them ImageButton
s?
2 Likes
Is there a reason you don’t want to use ImageButtons?
I mean, the reason is that I cannot edit them since the Slots are perfectly placed and if I insert or change anything; it could broke. I was trying to find a plugin that changes classes but the one I found wasn’t working.
Okay so what I would do is paste a script into the command bar that will do this for you. I am on mobile so give me a moment to write it.
SELECT THE TEXTBUTTON then paste this script into the command bar:
button=game.Selection:Get()[1]
for i,v in pairs(button:GetChildren()) do
local new = Instance.new(“ImageButton”)
new.Name=v.Name
new.Size=v.Size
new.Position=v.Position
new.Image=v.Image
new.Transparency=v.Transparency
for i,v in pairs(v:GetChildren()) do v:Clone().Parent=new end
new.Parent=button
v:Destroy()
end
It looks like it has an error but I will try to fix it. Thanks.
Oh, sorry about that. I don’t see where but maybe you’ll find it. Sorry that I couldn’t help more, it’s 2AM and I am typing this from my iPhone. Glad I was able to help though!
1 Like