Lightbox 1 Time Pop-Up Code Not Working

I have read the Wix help for a Pop-up lightbox appearing once for users, found here :

For some reason, it’s not working for me and I’m here to see if anyone knows why. I have attached a screenshot of the code below. I want first time users to see the Lightbox and then never have to see it again if they return to the site, which is outlined in the link attached. What’s going on?

You should move the line local.setitem above when you open the lightbox or move that line into the lightbox window code for maximal stability.

Thanks for your suggestion. Can you give me an example of what that looks like? Sorry, I’m super new to all of this coding stuff.

I too can’t get this script to work. it appears to enter the value, it’s in my local storage for the page, but the lightbox still pops up each and every time.
thoughts?