How to script in Roblox Studio in 2024: Episode 5 - Conditional Statements

  Рет қаралды 6,968

Avercile

Avercile

Күн бұрын

Пікірлер: 58
@-_XS_-
@-_XS_- 2 ай бұрын
Yeah a game with the code from the past few episodes would be very helpful. Also you’re really good at explaining so thx for the tutorials
@stoneproductionz
@stoneproductionz 7 ай бұрын
I finally wrote my own 29 line code without any help of watching the video, and it worked.
@EditsProdz_official
@EditsProdz_official 4 ай бұрын
What was it
@GradeAGames
@GradeAGames 2 ай бұрын
@@EditsProdz_official i agree
@Grayblockgaming-kn6zf
@Grayblockgaming-kn6zf Ай бұрын
Same
@Taswellwastaken
@Taswellwastaken 9 ай бұрын
W, im learning alot
@Bread-g5m
@Bread-g5m 2 күн бұрын
THIS SERIES IS SO GOOD!
@LuckySAMLLC
@LuckySAMLLC 2 ай бұрын
You got a new sub in the second video of the playlist ; Awesome tutorials, everything else is either outdated or bad!
@MEGACHUNKUS
@MEGACHUNKUS Ай бұрын
men your the only one that teach script in 2024 tthanks wwwwwwwww
@plecid
@plecid 3 ай бұрын
Learning so good right now thank you.
@LGREACTS
@LGREACTS 2 ай бұрын
dude this episode was really cool, i really liked it :)
@Vipen_
@Vipen_ 8 ай бұрын
Really helpful and I'm learning fast! you got a new sub
@GraytoadsAnimations-ly1xo
@GraytoadsAnimations-ly1xo 3 ай бұрын
These lessons are very helpful!
@Hollownugget
@Hollownugget 2 ай бұрын
Works better then everything else ig
@jurisbalta5844
@jurisbalta5844 7 ай бұрын
local carrots = 15 local CarrotDemand = 10 if (carrots < CarrotDemand) then print("not enuff carrots") elseif (carrots > CarrotDemand) then print("too many carrots") else print("yay, 10 carrots!!!!") end this works : P
@haarislalantacon
@haarislalantacon 5 ай бұрын
It should be elseif (carrots = CarrotDemand) then Pring("yay 10 carrots")
@muigokumaster9659
@muigokumaster9659 5 ай бұрын
​@@haarislalantacon nah this works
@ZOOO67
@ZOOO67 3 ай бұрын
i skipped last episode cause it made no sense and this is no diffirent i thought i had it in the first few but this is to hard.
@muigokumaster9659
@muigokumaster9659 3 ай бұрын
@@ZOOO67 crazy
@ZOOO67
@ZOOO67 3 ай бұрын
@@muigokumaster9659 ikr
@saucytacosYT
@saucytacosYT Ай бұрын
21:21 I know this doesn't do a thing yet, but I still have an unstoppable urge to try it
@Krico75
@Krico75 3 ай бұрын
W teacher?
@stephen5070
@stephen5070 5 ай бұрын
Else If statements have priority values from top to bottom in the lines of code.
@fidosesk
@fidosesk 3 ай бұрын
W
@jimmeyscool
@jimmeyscool 8 ай бұрын
Omg im thanks i have actuall lert this kinda lol
@LongKat
@LongKat 6 ай бұрын
I understand this full video but with the and code it didn't print this is what I put local bob = 2 local bob=1 if bob == 2 and bob == 1 then print("once in a lifetime") end bob did equal 2 and 1 but it didn't print (edit i tried other things and it worked)
@Glitchedts
@Glitchedts 6 ай бұрын
Try local bob1 = 1 And local bob2 = 2
@Glitchedts
@Glitchedts 6 ай бұрын
Basically happened is that you you made two lines of the same variable
@Dersill6
@Dersill6 3 күн бұрын
Someone mentioned this but i now realize why sometimes my code dont work: I didnt see that you mentioned bob as two variables with two different values
@simeongio9392
@simeongio9392 4 ай бұрын
How would you make a random number generator using this? Like for example i want to the script to choose a number from 1-10 and print out the number it that got picked. Does anyone have an idea in how to do this?
@CheeseGod2323
@CheeseGod2323 3 ай бұрын
There is something called random and I think it a type of function?
@Miboorb
@Miboorb 2 ай бұрын
Local function randomNumber() | Local rn = math.random(1, 10) | Return rn End Print(randomNumber()) --NOTE: randomNumber and rn are both replacable and are arguments
@Pixel-guy285
@Pixel-guy285 6 ай бұрын
RENA YOU BETTER PUT THE SOLS RNG VIDEO (also pin me)
@Grayblockgaming-kn6zf
@Grayblockgaming-kn6zf Ай бұрын
No
@LordStormelion
@LordStormelion 6 ай бұрын
i cant use the not equal sign as its not on my keyboard, are there any alternatives?
@not4sin
@not4sin 5 ай бұрын
i think u can use ~
@not4sin
@not4sin 5 ай бұрын
not sure tho
@LordStormelion
@LordStormelion 5 ай бұрын
@@not4sin that key isn’t on my keyboard
@DayNighter
@DayNighter 5 ай бұрын
@@LordStormelion an alternative is not scripting
@LordStormelion
@LordStormelion 5 ай бұрын
@@DayNighter fair point
@科
@科 3 ай бұрын
14:58
@ronsenrattler5879
@ronsenrattler5879 8 ай бұрын
How do i put it in a script?
@UcheReborn
@UcheReborn 6 ай бұрын
you have to open explorer in view first
@UcheReborn
@UcheReborn 6 ай бұрын
then look for serverscriptservice
@UcheReborn
@UcheReborn 6 ай бұрын
then double click and click on script
@DJMadara.
@DJMadara. 8 ай бұрын
local part1 = game.Workspace.Part if part1.BrickColor == BrickColor.new("Baby blue") then print("its baby blue uganda") elseif part1.Brickcolor == BrickColor.new("Really red") then print("its not baby blue!") else print("its over...") end So I wrote this but it says "Brickcolor is not a valid member of Part "Workspace.Part"" what do I do?
@Avercile172
@Avercile172 8 ай бұрын
Hi, thanks for watching! As to your question, it's simply because "Brickcolor" is in-fact not a property of "Workspace.Part". So it's very important to use proper syntax or the game won't know what you're talking about. The proper syntax is "BrickColor", simple mistake is all, but it happens to all of us. Hope that helped!
@DJMadara.
@DJMadara. 8 ай бұрын
@@Avercile172 yeah thank you so much man! Those little mistakes are really important now I see it
@Skyfa1
@Skyfa1 6 ай бұрын
@@Avercile172 is lua case sensitive for everything?
@HecticGates
@HecticGates 6 ай бұрын
@@Skyfa1I think so
@LittleBigStinker
@LittleBigStinker 8 ай бұрын
x = 5 is the same as set x to 5, so it doesnt make any sense to say if set x to 5 then "==" on the other hand is checking if it is equal to something local part = game.Workspace.Part local chance = math.random(1,2) if chance == 1 then part.BrickColor = BrickColor.new("Really red") else part.BrickColor = BrickColor.new("Medium stone grey") end if part.BrickColor == BrickColor.new("Really red") then print("die") else print("live") end
@Salsa-cookie
@Salsa-cookie 6 ай бұрын
Brick color isnt gonna work its gonna error make type Color3.new()
@kmfives
@kmfives 2 ай бұрын
forgot that i was supposed to be watching the video, instead went and made this: local part1=game.Workspace.Part if part1.BrickColor==BrickColor.new("Medium stone grey") then print("the part is grey!") else print("the part is not grey!") print("changing color...") wait(2) part1.BrickColor=BrickColor.new("Medium stone grey") wait(2) print("the part is grey!") end
@Hollownugget
@Hollownugget 2 ай бұрын
Your pfp says alot about you
@alekounis
@alekounis 5 ай бұрын
look at my script teacher tysm local y = 5 if y == 4 then print("Hello") elseif y == 5 then print("Hi") else print("Bye") end if y == 5 then local part = game.Workspace.hi part.BrickColor = BrickColor.new("Olive") end if y == 4 then local bob = game.Workspace.hi bob.BrickColor = BrickColor.new("Eggplant") else local bab = game.Workspace.hi bab.BrickColor = BrickColor.new("Really red") end local beb = game.Workspace.hi if beb.BrickColor == BrickColor.new("Really red") then beb.Anchored = true else beb.Anchored = false end its practice :)
How to script in Roblox Studio in 2024: Episode 7 - Loops
28:57
Making a Game in Lua with No Experience
5:52
Goodgis
Рет қаралды 320 М.
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 30 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 41 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 13 МЛН
How to use Data Stores in Roblox Studio!
21:01
CactusDrip
Рет қаралды 103
This Is What 2 Years Of Scripting Looks Like
45:59
Ludius
Рет қаралды 30 М.
How to script in Roblox Studio in 2024: Episode 4 - Functions
42:12
Explaining ModuleScripts As If You Were 5
9:01
ByteBlox
Рет қаралды 60 М.
How to script in Roblox Studio in 2024: Episode 8 - Instances
15:16
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 30 МЛН