Alright so here it is, my basic noob thoughts on things.
API: API is just another word for scripts.
GetChildren: This command does some magical mysterious thing I don't understand
Base Script, Script and Server Script are ALL the same thing.
Please correct me if i am wrong on any of these!
API: This means Application Program Interface
- basically it's a huge instruction guide for every single type of code and object in Roblox Studio. This is extremely useful for scripters, and you should get in the habit of using it.
GetChildren: :GetChildren()
is a method that you can use on objects to have a list of all their children, so you can check each child for a property, or part, or anything really.
Base Script: This is a class that all scripts in Roblox Studio are assigned to, except for the Module Script.
Script: When someone says "script", they usually mean a server script, but sometimes people aren't specific and "script" just means any type of script in general.
Server Script: In Roblox Studio a regular "Script" object is a server script. This means that the script is run on the entire server and can't access private properties of players.
I loosely defined all these terms, but you should be able to understand these terms yourself. At least try to learn something on Google/Youtube before coming on to ask questions here, and use the API.
"In computer programming, an application programming interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication between various components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. An API may be for a web-based system, operating system, database system, computer hardware, or software library. An API specification can take many forms, but often includes specifications for routines, data structures, object classes, variables, or remote calls. POSIX, Windows API and ASPI are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage and implementation."
--Wikipedia's definition on API
Instance:GetChildren()
is not a command, it is a method. It returns a table of the children of the object you called it on. There is nothing mysterious or magical about that.-- Example of the GetChildren method, assuming it's in a Baseplate template local children = workspace:GetChildren() for i = 1, #children do print(children[i]) -- Terrain Camera Baseplate end
BaseScript
is the base class of the Script
and LocalScript
classes. Just like how BasePart
is the base class for Part
s, MeshPart
s, TrussPart
s, etc. The LocalScript
class actually inherits from Script
, and the Script
class inherits BaseScript
, which itself inherits LuaSourceContainer
. ModuleScript
s do not inherit BaseScript
, because of how different they are. It just inherits from LuaSourceContainer
.local localScript = Instance.new("LocalScript") local moduleScript = Instance.new("ModuleScript") local serverScript = Instance.new("Script") print(localScript:IsA("Script")) --> true print(localScript:IsA("BaseScript")) --> true print(localScript:IsA("LuaSourceContainer")) --> true print(serverScript:IsA("BaseScript")) --> true print(serverScript:IsA("LuaSourceContainer")) --> true print(moduleScript:IsA("BaseScript")) --> false print(moduleScript:IsA("LuaSourceContainer")) --> true
GetChildren
: Method of Instance
that returns a table of children of the object you called GetChildren
onBaseScript
: Base class for Script
and LocalScript