Is it possible to make instance created text buttons work with mouse button 1 up?

I’ve tried to get the text buttons with GetChildren but it doesn’t work so I’m asking if there is another way.
I’m asking for ideas on this so please give some positive input.

So your saying is it possible to like use mouse button 1 click with a button that was created in the script? The answer is yes, if you say something along the lines of

local textbutton = Instance.new("TextButton", player.PlayerGui.whatever)
textbutton.MouseButton1Click/whatever print('hi")

but just something like that if you get what i mean should work and “print” hi. Btw dont use that script obv cuz its just a example if thats what your looking for.