Please use the Scripting forum for general scripting questions and not the 2D forum which should be used for specific 2D questions etc. If you are asking about 2D specific things then you should clearly indicate that in a question.
Also, please use code-tags . Finally, don’t just state something “isn’t working”. Describe what you expect it to do, what it’s doing and what you’ve done to debug it. Your post is known as a low effort post. Please see the Community Code of Conduct .
I’ll move your post for you.
Thanks.