@@EuphoricPlaceHolder im sorry it wouldent ik im not dev but you should type this i belive i could be wrong local Baseplate = game.Wokspace.Baseplate if Baseplate.Transparency == 0 then game.Workspace.Baseplate.Transpareny = 1 I belive this last part is wrong but hey im not an expert it may work
1:00 for my people learning to script on roblox during quarantine, the simpler understanding is that == is asking "are they equal?" and = is saying "this is the value Example: 3 == 3 it's checking if the first value is equal to the second value x = 3 its saying that the value of x is 3
@@Astrolightation end is a function which is used in script ends and sometimes used in the middle of a script or anywhere they are a function which makes the script stop and Example : so when your script is got red line under for no reason the end is used if 2 are red lined it will be end end)
@@Astrolightation Variables are a function which holdes all the data of the script Examples: if your script is in a part in workspace you need to write local (partname) = script.workspace If you want to make a script a child of the part or item you need to write local (where your inserting the script) = script.parent this makes the script a child of the item or part your inserting the script
All though its been 5 years i am now a pro scripter cause of this guy and he does such a fantastic job of explaining scripting and all that stuff and without him idk if i would of been able to script lmao
he has managed to fit this topic into a 7-minute video while all those Roblox scripting "pros" make a whole 20-minute video and in the end, you barely understand a thing they said. Your content is very beginner-friendly, keep it up and never give up!
Just now going through your tutorials and they're super helpful! I really like that you give a lot of examples when explaining it bc it makes it easier to understand :)
Thanks to this series i managed to make my first script !😁 local Baseplate = game.Workspace.Baseplate local function Test() Baseplate.Anchored = false wait(2) if Baseplate.Anchored ==false then Baseplate.Anchored = true
local Baseplate = game.Workspace.Baseplate local function test() if Baseplate.Anchored == true then Baseplate.Anchored = false wait(2) Baseplate.Anchored = true end end test() It should be more like that
i’m bad at scripting but you could make it even shorter maybe idk local base = game.Workspace.Baseplate base.Unanchored = true wait(2) base.Anchored = true keep in mind that i wrote this with only 20 minutes of tutorial watching experience, expect it to not work at all 👍
@@ehtz It would work but only once but if you put it in a function you could call on it to do whatever you want just by putting as what he put Test() Which you can make repeat by doing, While true do Test() end Hope this helped!
All these years I knew you, I never knew you were so talented at stuff like this. Thank you for the tutorials, they help me a lot! Keep up the great work!
Using this tutorial I made an if statement to check if the baseplate was anchored, if it wasn’t it said “Anchoring the baseplate...” I then used code to anchor the base plate and then printed “The baseplate has been anchored”
Cool! I made some code that makes the baseplate dissapear smoothly. Here's the code. [plez credit me waa] local PartTransparency -- The Baseplate's transparency, if it wasn't obvious enough local i = 0 -- For a loop local Baseplate = game.Workspace.Baseplate -- I know this isn't needed but it's to make my code shorter Baseplate.CanCollide = 1 wait(10) -- Initialize collisions, just in case while i < 1.1 do -- Basically how this works is "while" a condition is true [or yes], it will do this action. Otherwise, it stops. i = i + 0.1 PartTransparency = i Baseplate.Transparency = PartTransparency print(i) -- For debugging. I have no idea why the decimal points go from 0.2 to 0.399999999999999. Floating point is very smart if i > 1 then Baseplate.CanCollide = false print("Oh teh noes! Da baesplate haz DISSAPEARED!") -- For fun. Don't re-correct the message, otherwise you're a huge nerd. end wait(0.01) -- For any silly classic C++ bards, yes, they measure waiting time in seconds, not milliseconds. end
the if statements have a big importance to me, i am very sure many other fellow developers think these statements are important and they can’t make their games without them.
Don’t know why but a year ago I struggled really hard with these, they were way too complex for some reason and my brain couldn’t learn it right. It almost led me to copying code, but I just decided to stop Roblox developing in case I did start to copy Roblox code. But a year later and I decide to look back into it, and I can understand this tutorial so well and I even took some notes that helps me even more. Thanks DevKing 👍! Not that prepared for advanced but I’m ready for anything 😃
Fun thing about lua and python is that even if you learn 1 you can also easily master and learn another I learnt puthon and because of that lua is every easy
These tutorials are very helpful! I've been doing scripting for a while and I am not fully advanced. These things help set me up for certain things. Thanks so much for making these series.
I have watched so many coding tutorials and they all make it super complicated. Thank you so much for this series. I am confident I will be able to make a game by the end :)
i had a little fun and did this, local x = 1 local y = 3 print (x+y) if x+y==4 then print ("yes") end i made it so it says "yes" when 1+3=4 which it is so the output is 4 yes
man ur the best i still cant belive that i understand this now instaid of thinking those are random words and "what the heck do they even do" i dont have that feeling after watching ur playlist
im kinda late to your beginners roblox scripting series but 3 mins into the video i already knew what if statements are so thankyou and ill be sure to be a pro soon from your videos :)
Im a few months into scripting. Watching through the playlist for beginners to refresh! This one caught my attention pretty awesome if statement tutorial!
Hey, thank you so much! I know it's not much, but I must thank you for teaching me! I was able to write a function that made a part become red, Neon and then into a ball after your if statement video. Keep it up! Also, I think I saw a huge bost in confidence her!
if you want to make it even more complex then you can do local a = game.Workspace.Baseplate if a.Anchored == true then a.Anchored = false end wait(2) if a.Anchored == false then a.Anchored = true end
What i learned for if statements: local part = game.workspace.Part if part.Anchored == true then part.Anchored = false wait(1) part.Anchored = true then can be done with numbers too: local x = 3 if x == 3 then print("Yeah boy") This will print ("Yeah Boy") because x = 3.
hey man. ive never scripted but im here on the 7th tutorial and i really understand and im starting to script alone. i used to think how people just make the scripts out of their mind. now i do it! thanks for these videos.
@@Voided2 local Baseplate = game.Workspace.Baseplate if Baseplate.Anchored == true then Baseplate.Anchored = false wait(2) Baseplate.Anchored = true end
i made a discovery if you put local x = 7 local y = 2 if x or y == 9 then print ("YES") it will print YES because it adds up and idk if he covers it later in the playlist but this is for people who didnt know
For anyone watching, you could use If statements to fix bugs in your game. For example, you could have it detects if a player has glitched into a area they shouldn't have, if they have then it teleports them out of there.
@@AriusWight were not in advanced so I don't exactly know but I bet it's like: you need a part, name it "OutOfBounds" and make it transparent and to have collideable false but cantouch on, then make it so when you touch "OutOfBounds" it teleports you to a in bounds coordinate and boom.
Alright so i tried to do the script and i got this local Baseplate = game.Workspace.Baseplate if Baseplate.Anchored == true then Baseplate.Anchored = false wait(2) Baseplate.Anchored = true end And my baseplate won't fall, what did I do wrong?
local Baseplate = game.Workspace.Baseplate if Baseplate.Anchored == true then Baseplate.Anchored = true wait(2) Baseplate.Anchored = false end If it's true it wont fall and if it's false it will.
this video is the best tutorial I have ever seen because I now know how to make a "if" statement and "if" statements are so important in scripting. thank you TheDevKing
THATS THE MOST EXPLAINED AND BASIC THING YOU EXPLAINED ME, here is a script that makes the baseplate invincible after 3 seconds: local Cheese = true if Cheese == true then wait(3) game.Workspace.Baseplate.Transparency = 1 end
If statements Local x = 3 If x == 3 then Print (“yes”) end - When making an if statement two equal signs are needed to check if it's equal. We use if statements to find things out so if a player has 1000 dollars then they can buy this item Local x = 3 Local x = 4 If x == 3 and y = 4 then Print (“yes”) end --The and lets you add more things so let's imagine a player needs 1000 dollars and 2000 exp to get this item Obviously if you don't have one or the other you can't get the item P.S thank you devking for these tutorials they are very helpful
THANK YOU SO MUCH! ive been trying to learn lua but i really didnt know where to starts from. I watched Up to this video at the time of this comment and i managed to make a colorchanging part!
this has nothing to do with if statements but what is the point of putting local in front of a variable because I noticed that this code still works a = 5 if a == 5 then print("sup") end I also noticed that u dont need local for functions either function hi() print("sup") end hi() So why do i need to put local? thank you!
5:22 u can also replace If Baseplase.anchored By using the variable: If Baseplate == true BUT you will have edit the variable to this: Local Baseplate = game.workspace.Baseplate.Anchored
For who still doesent get it it's simple it's just like if this block is anchored then play that music or something, and for who doesent understand wait you just put wait(any number) and the number you put next to wait is how many seconds it will wait and after the seconds finishing you have to put a script after the wait and it will play the script after waiting
I love the way you explane the scripting and now my best script is local Transparency = 0.5 local Anchored = true if Transparency == 0.5 and Anchored == true then game.Workspace.Baseplate.Transparency = 0.5 game.Workspace.Part.Anchored = false end print ("it worked!!!")
i made this scrip but the baseplate did'nt fall local Baseplate = game.Workspace.Baseplate if Baseplate==true then Baseplate.Anchored=false wait(4) Baseplate.Anchored=true end
local Baseplate = game.Workspace.Baseplate if Baseplate.Anchored == true then Baseplate.Anchored = true wait(4) Baseplate.Anchored = false end If it's true it wont fall and if it's false it will.
Thank you I really appreciate your hard work to teach us all scripting and I did learn scripting from you and I'm really great at it now, so I started teaching other people how to script, thanks man we all really appreciate your teaching and hard work :)
im learning stuff already 1:15 into the video because i already understand it because its like a function, im learning stuff and im proud. i put this code into the script: local function hi() print("Hotdog") end local x = 3 if 3 == 3 then hi() end and it worked!!!
wouldn't produce a value as in the code you wrote 'if 6 == 6' however the variable defines x = 6 so you should have written if x == 6 then it'd print the string
For those who don’t know, “Wait()” is an outdated version. Yes, it still works but to ensure smoother code execution do “task.wait()” Keep up the great work, you taught me 98% of the scripting I know
is this good? local b = game.Workspace.Baseplate local function weeee() b.Transparency = 1 wait(10) b.Transparency = 0 end local function yoink() b.Anchored = false wait(1) b.Anchored = true end weeee() wait(2) yoink()
Hey guys! Be sure to join the discord server if you have any questions or if you would like to meet me! discord.gg/FKcSyRh
i was trying to hack to get free robux. now i am making a game so thx for your help
so if i do this script it should give me the trancperacy of my baseplate?
if Baseplate == 1
print ("Yes")
end
would it work bcs imma try it
lol ik you dont see this anymore but THAT WAS AWESOME
@@saidabdiche5890 roblox mods I n t r e s t i n g ...
@@EuphoricPlaceHolder im sorry it wouldent ik im not dev but you should type this i belive i could be wrong local Baseplate = game.Wokspace.Baseplate
if Baseplate.Transparency == 0 then
game.Workspace.Baseplate.Transpareny = 1 I belive this last part is wrong but hey im not an expert it may work
1:00 for my people learning to script on roblox during quarantine, the simpler understanding is that == is asking "are they equal?" and = is saying "this is the value
Example: 3 == 3 it's checking if the first value is equal to the second value
x = 3 its saying that the value of x is 3
What this means?
if variable then
--code
end
if variable what
@@Astrolightation
@@Astrolightation end is a function which is used in script ends and sometimes used in the middle of a script or anywhere they are a function which makes the script stop and
Example : so when your script is got red line under for no reason the end is used if 2 are red lined it will be
end
end)
@@Astrolightation Variables are a function which holdes all the data of the script
Examples: if your script is in a part in workspace you need to write
local (partname) = script.workspace
If you want to make a script a child of the part or item you need to write
local (where your inserting the script) = script.parent
this makes the script a child of the item or part your inserting the script
@@Astrolightationthe word code dosent exist in lua...(Maybe)
They are used in printing tho
If statements are by far one of the most fun things to play around with in scripting. The amount of power an if statement gives you is just unmatched
ikr lmao
@@GoofySillyGuy samee
yes, then i wanna mess around with statements and random
Are you allowed to use != < > and all those in lua aswell?
@@col2650 yes, but the ! symbol is quite complex
Watching this in 2024, still the most easiest to understand tutorials out there
AlvinBlox is a good option too! but this one def better
@@rowlzz idk Alvinblox is just confusing
true
I like this channel
+1
I was terrified to start scripting but once you get going you notice some patterns. Thanks for this series it's helped a lot
True right?
Your tutorials are so helpful and easy to follow, I love the content man! I haven’t found any others that have made it this fun and easy to do.
Thanks man! Glad you enjoy :)
couldn't have agreed more
That is right
so relatebele
@@TheDevKing live long life
All though its been 5 years i am now a pro scripter cause of this guy and he does such a fantastic job of explaining scripting and all that stuff and without him idk if i would of been able to script lmao
Im happy for you bro I just started 1 day ago and I hope to get better
@@disneyplusmember samee. what are u rn?
@@GameTime_Really Im still learning I restarted the playlist and I can understand much better than before
@@disneyplusmember oh, ive already done this and gui playlist. Learning modeling now, to make a game
This one is easy. Love it man keep it up!
Thanks bro :))
Please make more I really want to learn the full steps.
@@TheDevKing hey bro do you have any successful games that you have made and hoe much robux have you made from them?
@@Oiluptylervitelliorelse5 years ago he made this, I don’t think he is gonna still comment on a video from 5 years ago.
The fact that you're tutorials are also kid friendly just makes it better so aspiring developers on the younger side can also learn
Just like me lol
Yeh lol I’m 10
Why are there kids here now
@@Sejdkkk They want robux
POV: Me, who is 10, trying to learn scripting so that I can make games:
he has managed to fit this topic into a 7-minute video while all those Roblox scripting "pros" make a whole 20-minute video and in the end, you barely understand a thing they said. Your content is very beginner-friendly, keep it up and never give up!
Honestly, this is one of the most self explanatory tutorials here...aside from the having == instead of = to avoid confusion with the variable things
== is used in every type of programming im sure
I love how this man explains things, it's helping me learn the basics so quick
Definitely
Just now going through your tutorials and they're super helpful! I really like that you give a lot of examples when explaining it bc it makes it easier to understand :)
Thats awesome! I'm glad It could help. You'll be at the advanced series in no time :)
2nd Comment lol
Thanks to this series i managed to make my first script !😁
local Baseplate = game.Workspace.Baseplate
local function Test()
Baseplate.Anchored = false
wait(2)
if Baseplate.Anchored ==false then Baseplate.Anchored = true
end
end
Test()
local Baseplate = game.Workspace.Baseplate
local function test()
if Baseplate.Anchored == true then
Baseplate.Anchored = false
wait(2)
Baseplate.Anchored = true
end
end
test()
It should be more like that
i’m bad at scripting but you could make it even shorter maybe idk
local base = game.Workspace.Baseplate
base.Unanchored = true
wait(2)
base.Anchored = true
keep in mind that i wrote this with only 20 minutes of tutorial watching experience, expect it to not work at all 👍
@@ehtz It would work but only once but if you put it in a function you could call on it to do whatever you want just by putting as what he put Test() Which you can make repeat by doing,
While true do
Test()
end
Hope this helped!
@@noobsarebetterthanu5820 well im a noob
Nice
All these years I knew you, I never knew you were so talented at stuff like this.
Thank you for the tutorials, they help me a lot!
Keep up the great work!
same
Yo devking I was very confused with scripting and i thought i couldnt do it. But when I found you in TH-cam, it helped me learn alot! Thanks devking❤
Using this tutorial I made an if statement to check if the baseplate was anchored, if it wasn’t it said “Anchoring the baseplate...” I then used code to anchor the base plate and then printed “The baseplate has been anchored”
Cool! I made some code that makes the baseplate dissapear smoothly. Here's the code. [plez credit me waa]
local PartTransparency -- The Baseplate's transparency, if it wasn't obvious enough
local i = 0 -- For a loop
local Baseplate = game.Workspace.Baseplate -- I know this isn't needed but it's to make my code shorter
Baseplate.CanCollide = 1
wait(10) -- Initialize collisions, just in case
while i < 1.1 do -- Basically how this works is "while" a condition is true [or yes], it will do this action. Otherwise, it stops.
i = i + 0.1
PartTransparency = i
Baseplate.Transparency = PartTransparency
print(i) -- For debugging. I have no idea why the decimal points go from 0.2 to 0.399999999999999. Floating point is very smart
if i > 1 then
Baseplate.CanCollide = false
print("Oh teh noes! Da baesplate haz DISSAPEARED!") -- For fun. Don't re-correct the message, otherwise you're a huge nerd.
end
wait(0.01) -- For any silly classic C++ bards, yes, they measure waiting time in seconds, not milliseconds.
end
@@bearreyes1837 You can use tweening, its good piece of code. Tweening is so smooth and very easy to learn
@@its_hallux4581 I actually know already, I just didn’t discover it that time I made the code.
I love this, you are the only tutorial i could find that is not hard to understand, definitely making a game by the end of this!!!! Love this series!
Me too
me too
Cosmic Blox hey guys wanna share some ideas to each other and probably help each other out add me on discord Riryo#1652
pelumi bello Cosmic Blox hey guys wanna share some ideas to each other and probably help each other out add me on discord Riryo#1652
@@RealSpyduh can u build?
I like if statements, and I'm excited to learn them! I've been wanting to learn them for a long time! Cool!
Me too!
the if statements have a big importance to me, i am very sure many other fellow developers think these statements are important and they can’t make their games without them.
me too.
@@firacita mhm! Like if you want to do:
if - line of code right her then
print(“”)
If statements are really important.
Uhhh... What us if statements really for?
*first 25 sec* explains the concept I didn't understand for 2 days
me: yeah this is the good tutorial
Ikr
if statements are actually so easy if u got experience
Don’t know why but a year ago I struggled really hard with these, they were way too complex for some reason and my brain couldn’t learn it right. It almost led me to copying code, but I just decided to stop Roblox developing in case I did start to copy Roblox code. But a year later and I decide to look back into it, and I can understand this tutorial so well and I even took some notes that helps me even more. Thanks DevKing 👍! Not that prepared for advanced but I’m ready for anything 😃
hve to take notes?
@@tkn1ght493 i always take notes its fun
Fun thing about lua and python is that even if you learn 1 you can also easily master and learn another
I learnt puthon and because of that lua is every easy
same
These tutorials are very helpful! I've been doing scripting for a while and I am not fully advanced. These things help set me up for certain things. Thanks so much for making these series.
I have watched so many coding tutorials and they all make it super complicated. Thank you so much for this series. I am confident I will be able to make a game by the end :)
He doesnt explain best practices. Variable names need to be descriptive.
Don’t worry, I usually say “equals equals”
gamerdude4 lel
Ok
* Equals to equals to
lol
I just say it as "if it equals" because that's what it means.
4:51 the most satisfacing sound in this vid
i had a little fun and did this,
local x = 1
local y = 3
print (x+y)
if x+y==4 then
print ("yes")
end
i made it so it says "yes" when 1+3=4
which it is so the output is
4
yes
Yeah I taught myself some scripting basics
just wait until you learn about elif, you can make it say "no" if 1+3 is not 4!
Gotta love the like to dislike ratio, 1.1k likes and only 9 dislikes. Proves how good your tutorials are.
man ur the best i still cant belive that i understand this now instaid of thinking those are random words and "what the heck do they even do" i dont have that feeling after watching ur playlist
im kinda late to your beginners roblox scripting series but 3 mins into the video i already knew what if statements are so thankyou and ill be sure to be a pro soon from your videos :)
Thanks for these tutorials man, really nice and well explained. I'll be sure to like these videos, and re-watch them.
2022 and this guy is still giving the most usefull lessons, tysm gonna see the entire thing again so i can understand
Local x = “Dababy”
If x == “Dababy” then
Print(“Less go”)
end
@@roguenogue local x = Dababy
if x == Dababy then
print("less gooo")
end
local x = "less go"
if x == "Dababy" then
print("converteble")
elif x == " crewmate " then
print("susbro")
else
print("joemama"
end
@@unsimplehumain116 elif - elseif ?
print(“joemama” = print(“joemama”) ?
@@ItsLeeeroy ya im typing fast but elif is a real thing
mobile user detected initiating femur breaker
Ok so I tried this out on a Part, but then whenever I climbed the part, I just slipped and was flinged out of the part
3:04 so this is just a script to check if the scripts work or not
really good i took a break and i started watching over again it was so good that i remember almost everything!
Im a few months into scripting. Watching through the playlist for beginners to refresh! This one caught my attention pretty awesome if statement tutorial!
Hey, thank you so much! I know it's not much, but I must thank you for teaching me! I was able to write a function that made a part become red, Neon and then into a ball after your if statement video. Keep it up! Also, I think I saw a huge bost in confidence her!
if you want to make it even more complex then you can do
local a = game.Workspace.Baseplate
if a.Anchored == true then
a.Anchored = false
end
wait(2)
if a.Anchored == false then
a.Anchored = true
end
What i learned for if statements:
local part = game.workspace.Part
if part.Anchored == true then
part.Anchored = false
wait(1)
part.Anchored = true
then can be done with numbers too:
local x = 3
if x == 3 then
print("Yeah boy")
This will print ("Yeah Boy") because x = 3.
these tutorials are actually so good lol :) and it feels entertaining lol
hey man. ive never scripted but im here on the 7th tutorial and i really understand and im starting to script alone. i used to think how people just make the scripts out of their mind. now i do it! thanks for these videos.
This is an AMAZING tutorial series
7:10 --> it did not work for me. I wrote exactly what you did, I checked it so many times and it still doesn't work! Could you help me?
show me thr script
@@Voided2 local Baseplate = game.Workspace.Baseplate
if Baseplate.Anchored == true then
Baseplate.Anchored = false
wait(2)
Baseplate.Anchored = true
end
i dont like how he explains one thing for too long
but i like how he goes straight to the point
i made a discovery if you put local x = 7
local y = 2
if x or y == 9 then
print ("YES")
it will print YES because it adds up and idk if he covers it later in the playlist but this is for people who didnt know
For anyone watching, you could use If statements to fix bugs in your game. For example, you could have it detects if a player has glitched into a area they shouldn't have, if they have then it teleports them out of there.
How? I mean I understand this. But how do you type it?
@@AriusWight man I typed this 9 months ago I’m onto. Better things lmao.
you can ask this on the dev forum though
@@AriusWight were not in advanced so I don't exactly know but I bet it's like: you need a part, name it "OutOfBounds" and make it transparent and to have collideable false but cantouch on, then make it so when you touch "OutOfBounds" it teleports you to a in bounds coordinate and boom.
Alright so i tried to do the script and i got this
local Baseplate = game.Workspace.Baseplate
if Baseplate.Anchored == true then
Baseplate.Anchored = false
wait(2)
Baseplate.Anchored = true
end
And my baseplate won't fall, what did I do wrong?
local Baseplate = game.Workspace.Baseplate
if Baseplate.Anchored == true then
Baseplate.Anchored = true
wait(2)
Baseplate.Anchored = false
end
If it's true it wont fall and if it's false it will.
@@rainyway3661 i did what he did in the video and my baseplate didnt fall for 2 seconds, it didnt fall at all
only 7 minutes? im subscribing
Watching this 6 years later still best scripting tutorials out there
This one is one of my favourite. Your tutorials are very nice and fun. Keep it up!
When you move on to if statements it feels like you finish a subject in history class.
No Cap😂
LOL IT DOES
this video is the best tutorial I have ever seen because I now know how to make a "if" statement and "if" statements are so important in scripting. thank you TheDevKing
i see a cat on someones window rn
joe
@@TTVgranny1BC mama cant script
@@obease_kitten_4552 nigga
THATS THE MOST EXPLAINED AND BASIC THING YOU EXPLAINED ME, here is a script that makes the baseplate invincible after 3 seconds:
local Cheese = true
if Cheese == true then
wait(3)
game.Workspace.Baseplate.Transparency = 1
end
If statements
Local x = 3
If x == 3 then
Print (“yes”)
end
- When making an if statement two equal signs are needed to check if it's equal.
We use if statements to find things out so if a player has 1000 dollars then they can buy this item
Local x = 3
Local x = 4
If x == 3 and y = 4 then
Print (“yes”)
end
--The and lets you add more things so let's imagine a player needs 1000 dollars and 2000 exp to get this item
Obviously if you don't have one or the other you can't get the item
P.S thank you devking for these tutorials they are very helpful
1:23, I don't understand what equal to equal means.
yea i have the same problem idk what that means
You ain’t joking about being the dev king being a good king, helping your people!
THANK YOU SO MUCH! ive been trying to learn lua but i really didnt know where to starts from. I watched Up to this video at the time of this comment and i managed to make a colorchanging part!
bro that makes me have an idea for a generator from a horror game, im so excited for learning more!!!
this has nothing to do with if statements but what is the point of putting local in front of a variable because I noticed that this code still works
a = 5
if a == 5 then
print("sup")
end
I also noticed that u dont need local for functions either
function hi()
print("sup")
end
hi()
So why do i need to put local?
thank you!
When I was watching a video the person said local just makes it execute a little faster
But then again not sure that's why I am here learning xd
Because there local makes it so that only local functions and such use local variables!
This is the first comment
While watching this I got kind of a grasp on elseif statements, so thank you again TDK :D
5:22 u can also replace
If Baseplase.anchored
By using the variable:
If Baseplate == true
BUT you will have edit the variable to this:
Local Baseplate = game.workspace.Baseplate.Anchored
this helps me alot thanks devking
“==“ means “the same as”😊
just found out something, if you higlight some text in RBX studio and do a parenthesis it will do a parenthesis around the text :0
Can someone tell me why 7:00 did not work for me
For who still doesent get it it's simple it's just like if this block is anchored then play that music or something, and for who doesent understand wait you just put wait(any number) and the number you put next to wait is how many seconds it will wait and after the seconds finishing you have to put a script after the wait and it will play the script after waiting
my parents put me in a course to learn coding. out of all my 5 months(I think), I have learned more from here
I learn from here only because I really want to make Roblox games :)
I love the way you explane the scripting and now my best script is
local Transparency = 0.5
local Anchored = true
if Transparency == 0.5 and Anchored == true then
game.Workspace.Baseplate.Transparency = 0.5
game.Workspace.Part.Anchored = false
end
print ("it worked!!!")
Yay! I was excited for this one, always wanted to learn about if statements.
thank you so much dude. these tutorials have helped me so much, and i'm doing a lot better at scripting
i made this scrip but the baseplate did'nt fall local Baseplate = game.Workspace.Baseplate
if Baseplate==true then
Baseplate.Anchored=false
wait(4)
Baseplate.Anchored=true
end
local Baseplate = game.Workspace.Baseplate
if Baseplate.Anchored == true then
Baseplate.Anchored = true
wait(4)
Baseplate.Anchored = false
end
If it's true it wont fall and if it's false it will.
@@rainyway3661 Thank you very much. it worked
one of the commons examples of If statements will be Players Health:
local playerHealth = 50
if playerHealth
Thank you I really appreciate your hard work to teach us all scripting and I did learn scripting from you and I'm really great at it now, so I started teaching other people how to script, thanks man we all really appreciate your teaching and hard work :)
im learning stuff already 1:15 into the video because i already understand it because its like a function, im learning stuff and im proud. i put this code into the script:
local function hi()
print("Hotdog")
end
local x = 3
if 3 == 3 then
hi()
end
and it worked!!!
Thank, you dude!! I’ve learned a lot about scripting bc of you!
your really helpful, got a new sub! thank you sooo much for your scripting tutorials!
"SO it's very simple"
Beginner : Have courtesy with me.
Dude, you just got the Oscar for being so epic.
Love the vids so far, i really can come along pretty good.
Thank you.
- Drago
Before i learned python i was trying to learn lua and found it hard, but when i learned it i found that learing lua is too easy specially with you
His short chuckles makes the tutorial more lively tbh
hey! quick question. how do i zoom in when scripting so the code is bigger?
Ctrl + mouse wheel up
3:59 and how i will know in the output who is true or false:?
Can you please help me, I am trying to figure out how to combine two if statements so that it will only activate if two separate things apply
Put if statement 1 then put and then put if statement 2
Quick question - why, instead of a little line (|), is an ENTIRE KEY OUTLINED IN BLACK and when I type it types OVER WHATS THERE
Nvm I fixed it
this is soooo coool most coolest scripting tutorial i have ever seen
Question could you make a if statement for colors
local x = 6
if 6 == 6 then
print("YouJustGainedANewSubscriber")
end
wouldn't produce a value as in the code you wrote 'if 6 == 6' however the variable defines x = 6 so you should have written if x == 6 then it'd print the string
@@zenoctis196 you are saying 6 isnt 6? you should only correct people when they are not right.
@@zenoctis196 idiot
Would the statement still work in a folder?
1:00
basically, == means IS IT? and = means IT IS.
I am subscribing. This is the best youtube channel
Im watching much after the vid was made but tbh this guy is literally one of the best teachers
For those who don’t know, “Wait()” is an outdated version. Yes, it still works but to ensure smoother code execution do “task.wait()”
Keep up the great work, you taught me 98% of the scripting I know
Knowing python definitely helps! Thanks for the videos!
I totally agree I recently started learning Python and Java and I realized lua is like both those languages
I know the basics of c# and i can say Lua is really similar, it kinda feels like if c# and python had a baby to me
This guy is an absolute legend
is this good?
local b = game.Workspace.Baseplate
local function weeee()
b.Transparency = 1
wait(10)
b.Transparency = 0
end
local function yoink()
b.Anchored = false
wait(1)
b.Anchored = true
end
weeee()
wait(2)
yoink()
Yea, that's good. It works.
In 1 day ican see 8 videos and it’s very good and thanks for learning
how do you make it so if you touch something something happends