im new to game development and i have seen people using . in their scripts what does it mean?
what is the period ( . ) used for in scripting?
2 answers
The period on roblox is used to represent the ancestry between classes and instances on studio. The way ancestry works is that if a an instance such as a part belongs in a type of folder or class (for eg: workspace), the part in which the class it is becomes the parent and the instance is the child of that class. So let us say I put a part in a folder called Bricks in the workspace. Because the part is inside the bricks folder, that folder becomes the parent of the part. This, by default will consider the part the child of the folder since it is inside it. Using the same logic, we can deduce that since the folder is in workspace; the parent of it is the workspace as the folder belongs to the workspace; and the folder becomes the child of workspace.
for example
--Let us break it down.
--Start with the parent.
game.Workspace
--Now insert a part into the workspace,
game.Workspace.Part
--This tells us that workspace is the child of game, and the parent of workspace is game. This also tells us that Part is inside the workspace class and is the child of it; opposing that is the workspace being the parent of the part.
--Now to sum things up, I added a folder in the workspace called bricks; using the same logic we can track down this part with our knowledge.
game.Workspace.bricks
--That is it.
3 comments
You should have incorporated how else " . " can be used, there is plenty other ways like tables, functions, and metamethods
There is only one use for the dot operator in general which is indexing.
Well since he is a beginner, let's not go that far into detail for him.
It separates out things. So this would be what it could be used for.
game.Workspace.Part.Name = "Hello"
What the (.) is doing is splitting the code. Its telling the code that the part that you want to change the name is in the "Game, then the Workspace, PartSelected then the property name and then the name you want it to be.
2 comments
sorta right. A lot wrong
This period represents the ancestry of the instances in the studio overview. What ancestry is, is basically what decides whether an object belongs to a specific class or service; for example, let us say I have a part it workspace: the part would be considered the child as it belongs to the workspace class and can be defined like this:
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Defining or indexing a value and or key in a data type.
what is a key and what is indexing?
WOAH DUDE -49 REP, ONE MORE REP LOSS AND UR BANNED!!!! Here is something you should know: You MUST provide code in all questions, you must be really clear and you mustn't duplicate and spam questions....