devforum-roblox-com-t-scripting-manual-for-everyone-2344386...
devforum-roblox-com-t-scripting-manual-for-everyone-2344386...
Hi, i’m roblox developer for 6 years, i’m started in 2017, first i wan’t to make robux, but
it was too hard for me, i’m was a noob, there was nothing on youtube to learn, i don’t
know dev forum. Now after this years of passion and learning, i’m wan’t to do
something more , i’m started programming in C++ laungage that is better. But before
that, i wan’t to share my knowledge to every noob like me 6 years ago, and i wan’t to
make real Programmer.
Note: I’m not good at english, i’m from Poland, and i can make a mistakes with times
and other things, please don’t mind that, i’m sure you can understand me.
Note: I’m will write this tutorial like book, soo lesson after lesson, and please make
sure you know how to use roblox studio , and it’s basics, now, open output, explorer
and propertiess, and insert your first script.
Topics: – some of topics are planned, i’m slowly writes this, if you are interested in
something there, leave a comment, i will try to write this topics early
1. Print() and Warn() functions
2. Variables and math operations
3. Usefull things to use
4. Manipulating Propertiess
5.Loops: While, For, Repeat
6. Events: Touched and Changed
7. Arrays and Tables
8. Making Systems
9. Services
10. Operators
11. Filtering Enabled
12. Detecting Components: GetChildren(), ChildRemoved(), ChildAdded()
13. Leaderstats
14. Tools
15. Local Scripts Basic
16. Math Functions
17. String Functions
18. Data Storing
19. Optimization Guide
20. Physics: Velocity and Body Movers
21. Raycasting
22. Path Finding Service 1/6
23. Upgrading Code
24. Advanced Loops
25. LERP - Linear Interpolation
26. Bézier Curves
27 Tweening.
28. Procedural Generation
29. Angle Calculation
30. CFrame: Advanced
31. Collection Service
32. Run Service
33. Tick() and Clock()
34. Advanced Data Stores
35. About Inventory System
36. About Gun System
37. About Grid Building System
38. Optimized Bots
39. AI for Animals/Mobs
40. Generating Shapes
41. About Loot System
42. Functions for effects
43. Corountines
44. Tips for PRO Scripters
1. Output: Print() and Warn()
print("hello world")
Okay, soo after you created script, you see this word, this is the basic function called
Print(), it prints text on output after running. Remember that this function is the best
debugger for future projects, use it in learning scripts, for finding bugs and for
informations.
warn("there is an error")
Warn is printing, but it's make to use when we wan't to show error, i
will explain this in the future, you can use warns of course, but
prints is better for that.
On math lessons, you have algebra where you have a letters that are values, this is
variables, a letter or text that are value, for example we have number a that is equals
to 5 for example.
--[[
this is how you can create comments for multi lines
]]
as you can see we have a lot of variable types, don't worry, this is
the easiest ones, now we moving to our first working
local x = 2
local y = 3
local z = 4
This is everything for today, i’m told that this is beginning of my manual,
if you are more advanced and you wan’t tutorial about some things, you have to wait
or
find another tutorial, you can link tutorials in comments, soo everyone can learn from
they
Thanks you for this lesson. Good luck at making your first steps in scripting.
Now we learn some usefull things like how to delay beetween functions and basic
calculation function.
print("Hi")
wait(1) -- we waiting 1 seccond
print("Hello, What's up?")
wait(1)
print("I'm passed exams")
wait(1)
print("Nice")
This dialogue that have no sense are example of using wait, of course
you will use this for almost everything, if you wan't to wait minutes
or hours, you need to transform secconds like this:
As you can see, this is a quick conversion for people who don’t know how to do this
Now it's time for calculation functions, it's the easiest one, and the
most important
local a = 5
local b = 10
This type of functions are common ones, they will help you to sort your
code and make calculations, or run something like laser shoot or
animation
Thank you for today’s lesson, please tell me if i helped you, it’s important for me
because i wan’t to help scripters, advanced and beginners
4. Manipulating Propertiess
Hi, this is day two of my tutorial, firstly i wan’t to talk about what to do for better
experience with programming in any enviroment.
Thats all for today’s lesson, i’m got a tip to write english more correctly, heh soo,
i will try to do that in the future, i’m think you learned something, thanks you for
reading
remember to leave a comment, bye!
Hi, soo this is fifth topic, now we moving into loops, three basic loops.
print("spam heh...")
wait(0) -- don't forget to add this, else you got error and studio cras
end
repeat
print("MORE SPAM") -- spam, i don't like it
index += 1 -- fun fact, you can do this to add value to existing value
wait(1) -- don't forget to add this, or you know... crash
until index > 5 -- our condition, if index will be greater than 5, the
Repeat loop isn't used as often as while or for, but it's good for
people who wan't to do something like automatic shooting or other
things, i don't use it personally
Soo, this is everything for today’s lesson, in the next lesson i’ll explain many new
things, like conditions and events, soo be patient and read slowly to get as much
knowledge as you can, good luck and goodbye!
function OnChanged()
if V.Value ~= 5 then
print("changed!")
end
end
-- when V parameter changes, the event fires and then binding to functi
V.Changed:Connect(OnChanged) -- connecting event .changed to this funct
This is all, sorry for that content, but i’m tired and it’s hard to write this, i’m hope i’ll do
this mission. Thank for your help and motivation. Bye
7. Arrays
Sorry for long time of no responce, i’m back. Soo this topic is easy, simple and very
usefull, let’s dive into it.
arrays can be used to make a lot of things easier, this is also data
type
local array = {}
local falsearray = "array"
end
Now we can move to loops section of this topic and usefull things to know
Soo, arrays and tables are data type that holds data and variables, you can use it in
almost everywhere. This is everything for this lesson, sorry for no responsing, but
slowly i’ll make this tutorial and bring it to the finish. See you later, bye!
8. Making Systems
Note: sorry for that, i have no time and i don’t script in LUA much, this is maybe the
last part of manual…
Systems are important, they are integrated scripts that works together making some
function inside your game.
This is more about talking, but i’ll give you some tips
To make system you should know what you wan’t to do, remember that you should
know basics of code, from loops and conditions you can make almost everything, you
only must know how!
Tips:
1 Use module scripts: modules are usefull to store arrays and functions
that can be easily accesed from every part of your game, this way you
can save time and optimize your code a little to make things required
for system's work
2 Optimize your code, this can be done in various ways, for example
don't make script in every brick that will make players off, instead
get all parts this type into array or tag it and then use .touched
event on every. Game now need to load your script once, not 500 times
soo this will be 500x less work for server
3 Make research, this includes testing basic use of code, like how to
manipulate strings or maybe more advanced data store
5 Work together, if your friend know how to script, they can make some
elements of code, you can make another and then make everything faster
6 if you work with friends, check your mistakes to fix them, this is
better than 10 hours of debugging xd
this is end, i have less time now, this is maybe the last part, sorry.
37. About Grid Building System
Soo, this is large skip, if there aren’t any previous topic, please wait.
Why i’m writing this, because this was my nightmare, i figured how to do that, but
you know, basic solution sometimes is pain.
1. Important Things
2. Where to start?
personally, every time i’m doing things like this i starts with local side, and then i
moving into server, but this time is different, first make raw systems, like function
that calculates grid for example values , script that checks if number is even or not
and basic correction system. Then try to connect each piece of code into one bigger
script.
Because you can make system relative to certain part, like maybe building zone.
Moreover you can make saving better, of course if you wan’t.
4. Example of functions:
33
There are many scripting manuals here, even in the devforums, back in 2017, there
isn’t much, now there is a lot
1 Reply 6
You know, when i was young, i can’t find manual, now i’m writing this for everyone, it’s
my final project on roblox, i wan’t to tell about basics, and more advanced things, like
how to make grid building system or maybe basic TPS system
1 Reply 7
1 year later
How to make leaderstats with data save i know how to make leaderstats but i can’t
make data save
1 Reply
uhhh, this tutorial was discontinued, there is newer version, idk if i’ve got to data
stores
If you ask about data saving, you need to use data store service to set custom key
(usually player’s userid) to table of data, you should make two functions, one loads
data from table when player joins and other saves player data to a table when he
leaves
Reply
Suggested Topics
Want to read more? Browse other topics in Community Tutorials or view latest
topics.
COMPANY DEVELOPER
© 2025 Roblox Corporation. All rights reserved.
About Roblox Learn
Accessibility Articles
Careers Reference
Technology Community
Terms Of Service Announcements
Privacy Policy
Parents
SOCIAL MEDIA
YouTube