Learn lua for beginners

LUA is a simple language, this topic is MAINLY about rblxlua not regular LUA


LUA can manipulate many things like many scripting languages but lets start with the basics
When changing properties you need to ADRESS the object using parents and children
Just like this!
That will adress the part
Changing brick color
Changing brickcolor may seem slightly complicated but it is quite simple
game.Workspace.Part.BrickColor = BrickColor.new("")
Inside the quotation marks you can adress a color from the roblox color palet
Now lets manipulate some objects with transparency!
game.Workspace,Part.Transparency = 0.5
for example
True and false

Here are some properties that can be changed using the words true, or false
Such as
game.Workspace.Part.CanCollide = false
game.Workspace.Part.Anchored = true

Variables must be adressed with the word “Local”, then you must adress the part of the script you want shortend
such as
local variable = instanse.new(“Part”, game.workspace)
then the script is shortened
variable.BrickColor = Brickcolor.new = ("")
Instanse creates objects via script and not placing a object manually
for example
notice when you run that nothing appears
Well thats because it needs to be adressed to the game like this
Instanse.new(“Part”, game.workspace)
Run that and see what happens!
But now i want to change its properties! How do i do that?
Just like this!
local variable = Instanse.new(“Part”, game.workspace)
As we talked earlier that is how you create a variable
Now lets change it!
variable.Transparency = 0.5
Now lets duplicate it
Function generatePart(60)
That will create 60 duplicated parts!
I hoped this helped!

if there are any suggestions
Reply to this comment so i can create a better tutorial :smiley:!