I have this simple part of a script
wait(5) if FRAME.Visible == true then repeat wait(3)check_Have() print("checking...") until FRAME.Visible == false end
Which does what I want it to, it runs the check_Have() function if the frame is visible after the 5 second wait, but I want it to be able to recognize when the FRAME goes from not visible to visible. Basically this works for when the frame is already visible but not for when it becomes visible after the 5 seconds. How would I notify the script that the frame has become visible?
FRAME.Changed:connect(function(prop) if prop == 'Visible' and frame.Visible == true then repeat wait(3) check_Have() print('Checking...') until FRAME.Visible == false end end)
I assume this is what you meant. The Changed event fires when a property of the frame changes and gives you a string containing the name of the property, in this case prop. It then checks that the visibility changed to true and if it did it then does your repeat loop.