Tips for working on with complex codes

Hi, I’m an ordinary teen who started to learn scripting. I know the basics and some advanced stuffs,but I got trouble understanding and writing complex codes.
Can I get tips moving on with complex codes?
Also,I have just got into dev forum😁, so sorry if I have posted this in the wrong category.
Have a Great Day🙃

1 Like

Comment everything, so that you can understand the work you have done previously.

If there are any settings, PUT THEM AT THE START (and comment them so you know what they do), so that you can easily change variables

2 Likes

I don’t know how to tell you but from my experience, I learned complex code from if else inside if else, and also from for in pairs/pairs.

experimenting is a good idea too, for example you want to make a moving object/npc move, or you want to experiment with creating a datastore in other ways too.

and also if you can do it but you have trouble seeing your own code, put a comment above or next to your code, so your code looks simple, like @SeargentAUS says.

1 Like

Thanks guys that gave me some kind of vibing energy