Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Help me with these basic definitions? Correct me if I am wrong, help me plz.

Asked by 5 years ago

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!

2 answers

Log in to vote
0
Answered by
Pojoto 329 Moderation Voter
5 years ago
Edited 5 years ago

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.

0
hmmm. So I suppose this is kinda easy to understand..the API part I get..kinda. API is like a dictionary for developers then? The script stuff still confuses me...As for the GetChildren...well I understand it a bit now, but I still don't know everything that it can be used for xD..which is fine hawkeye1940 8 — 5y
0
a dictionary? no User#19524 175 — 5y
0
:( I am beyond confused now...ugh people say to go to the wiki and stuff, I have tried tht. I don't know where to look I need a site that tells me how roblox studio works... how like your start with a script. What goes at the top of a script, what goes where, does it matter where it goes? UGH so many questions I am so frustrated xD hawkeye1940 8 — 5y
0
"An API provides a simpler way for developers to interact with other kinds of software." -LinusTechTips ----- Don't worry too much about the definition of API, knowing it won't make you a 100x better scripter. Pojoto 329 — 5y
0
Hawk, I suggest looking up "Roblox Studio for Starters" on Youtube, or "Roblox Scripting for Starters". Resulting videos for each of those have helped me begin scripting, and taking notes also helps. There are also usually tutorials if you need help with a specific script. Hope this helps even though I don't know very much about scripting, myself :' ) AmberEyeCanine 2 — 5y
Ad
Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

"API: API is just another word for scripts."

API is not a word for "scripts". It stand for Application Programming Interface.

"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

"GetChildren: This command does some magical mysterious thing I don't understand"

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

"Base Script, Script and Server Script are ALL the same thing."

No, they are not. BaseScript is the base class of the Script and LocalScript classes. Just like how BasePart is the base class for Parts, MeshParts, TrussParts, etc. The LocalScript class actually inherits from Script, and the Script class inherits BaseScript, which itself inherits LuaSourceContainer. ModuleScripts 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

"Help me with these basic definitions? Correct me if I am wrong, help me plz."

  • API: Application Programming Interface
  • GetChildren: Method of Instance that returns a table of children of the object you called GetChildren on
  • BaseScript: Base class for Script and LocalScript
0
I am sorry but your answer is way to complicated for me xD hawkeye1940 8 — 5y

Answer this question