NUI always open

Hi guys, I’m writing to ask for support on a resource I’m creating. I inserted a NUI into the script in question which should work only and exclusively when the player activates the script using qb-target, the problem is that the NUI opens from the moment the player enters the server.
If you know how to solve the problem I would be very happy to know what isn’t right for you, I’ll leave the client here
Thanks in advance for any help (I’ve only been working with NUI for a short time)

Showing some code will help. Are you making sure inside your HTML that it is hidden until it needs to be shown?