This is a really stupid and easy question to answer but if you can provide the link to me then that will be certainly helpful
What does Client and Server mean? When do I use them? When do I use a Local script,Normal script,and a Module script?
The Client
refers to the player that is inside the game. When you run things on the Client
, the action will only happen for them.
The Server
is the heart of the game. This is where most game actions take place, and where you'll do most of your work. Any action on the Server
will run for every player in the game.
A LocalScript
is a script that will only run on the client. Anything made in LocalScript
s is only replicated to the player, not to everyone else. You should handle user inputs and gui-related things here.
Exploiters can read and steal LocalScripts, so be wary.
A LocalScript will only run in these places, and their descendants:
ReplicatedFirst
serviceA Server Script
(Script) is a script that only runs on the server. It has access to all server services and the likes. Anything made on here will replicate to everyone. This is the most secure, as exploiters cannot see it's source. It's uses vary on a game-by-game basis, but most of the time you'll use server scripts to handle value changing.
A Script will only run in these places, and their descendants:
Workspace
serviceServerScriptService
serviceA ModuleScript
is a script that can be run on the server and the client. You reference them by using require
in the script you would like to. Module Scripts are typically used for storing data, or having custom functions. If you have a function that is repeated a lot in your game, it's recommended to use a Module Script.
Exploiters can read and steal Module Scripts, so be wary.
As a general rule of thumb, if you need the server to see it, but not the client, but it in ServerStorage
. If you need both or the client, put it in ReplicatedStorage
.
Client - the player(s) within the server.
Server - the server.
Hope this helped you.
Every player in a server has their seperate client. all the these clients together are called a server.
if you want to change something only in the 1 of the clients (the specific player) then you use a local script . you can use plr = game.Players.LocalPlayer
to get the plr as a variable.
A Normal Script (AKA a server side script) is used to change things in the server.these changes get replicated into all the clients and all players are able to see the change(e.g brick color has changed color) unlike local scripts.
I havent used module scripts much so i cant really say much about them. they are called upon from a script and the code in the module script gets executed. https://www.robloxdev.com/api-reference/class/ModuleScript