Would be great if anyone could help! So im confused on ipairs,pairs,functions,parameters,arguments,etc.
For an example
I insert a script into a part thats in the workspace. So i do
Anything = script.Parent
Anything.Touched:connect(function()
- The Question Is, What do i do after that function?
Lets get a bit more advanced.
Function OnTouch( ) <—####s this where i put my event/etc? A bit confused to the basics
Lets move ahead to parameters and arguments.
X = 3 - 3
Print(“X”)
- The question here is, Wheres the argument and parameter? What do they define?
Next, Ipairs and pairs. I truly think this is the most complex to me.
All i know is i,v in pairs. I need a fully brief explantion on it please. In addition, whats the difference between the two?
Lastly, the additonal part comes in, what does the term “return” do? Definition? How about “else”?
Why are symbols like “..” used in scripts and [] {}? Why cant it just be basic parentheses? I give up haha.
I would be truly thankful if anyone explained all this to me and maybe even teach more. I plan to become a dev! And no im not wasting your time for just a regular lesson of the day, im using your answers daily! Please notice this if you can! Thank you! And oh yeah! Please make it as simple as possible. I can see there is many vocabulary words used when people explain scripting. If you have to, go ahead.
|