I am in between the beginner and intermediate spot in scripting but I dont know when to use certain things like returning and how to check when a specific item has been moved to another service without breaking the script, etc. Almost like making a script more “dynamic”.
I’m not completely sure what you mean but are you maybe talking about using modules to keep your code more organized?
Also this really depends on what your doing, usually you return something from a function when you want to use it somewhere else
Lets say for example you did a tycoon button. The tree itself is in SeverScriptService but when you want it to be moved to workspace where the tree does stuff specific to workspace it wouldnt work
or the thought process behind making a script and actually thinking it out.
Well scripting is just problem solving, there are many solutions to 1 problem, dont get caught up on trying to use everything you may know, or may not know just figure out what can get you from point A to point B, and then once you have sufficient amount of knowledge you can go back and customize it a little
Like for example in animation, when your a beginner you mainly use a set technique but as you improve you start to be able to put personality into your animations and the scale shifts from technique to personality, kind of the same thing with scripting you start out by wanting to solve problems a certain way first but once you get better you can try new things and see what works for you and what doesnt
Scripting is an art form if you really think about it
yeah ig but its for loops that really are my main worries as I dont understand them to well, you have values and indexs but i dont know if you loop through a folder to get something or what.
Yeah basically folders are kind of like table but they are instances and you have to use methods like, instead of just passing thefolder by itself
Also you dont need to worry about anything, just make sure your learning and at least creating simple things that you can understand and then step outside of that a bit then get comfortable with that, then keep doing that until your comfortable enough to tackle even bigger projects, anybody can learn scripting after all it’s just problem solving but the barrier is having to basically learn a new language
“It may seem difficult at first, but everything is difficult at first”
I also have 1 more thing, can you set a parameters value on a diffrent script?
You mean parameter values from a function from a different script?
I mean if thats what you mean youd have to send over that using some sort of bindable event or you could use module scripts
But its hard to know since like im not sure what youd be trying to do