Roblox Loops Explained As If You Were 5

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 84

  • @byteblox100
    @byteblox100  10 місяців тому +6

    free preview of the course
    www.udemy.com/course/byteblox-expert/?referralCode=B83EFB1A86A5C3D5F206

  • @itsnotrememc3236
    @itsnotrememc3236 2 місяці тому +7

    to be more clear in this part 8:01
    "i" is the position or the location of that value whether its a:
    boolean = this -> true, false
    string = any word or sentence that is inside of this -> " "
    integer = any number #
    the position or location is represented as a number which is this: [#] or ["string"]
    the "v" is the value *of* THAT position
    here's the visual form:
    [1] = 123,
    [2] = "Hello"
    [3] = false
    || ||
    ( i ) ( v )
    ( i ) is the position and ( v ) is the value
    thank you tho for the explanation between the "for i" and the "for i, v"

  • @charlie_ck
    @charlie_ck 10 місяців тому +14

    The reason why it did not loop through the dictionary in the "correct" order is because dictionaries are not ordered since they are indexed with their keys so they don't need to be ordered, but tables are still always looped through in the correct order.

  • @imooxo5013
    @imooxo5013 9 місяців тому +5

    I’m learning how to read and write in Java and testing it on Lua and honestly just started working with looping and honestly this is a very useful video!!! Thankyou as I’m currently working on making a auto health regen pad so when a player touches part and needed to understand loop functions for this and video has helped me achieve this Thankyou!!! Only thing I think you should of included was “breaks” as they can be useful when working with loops ❤

  • @EvanFar_
    @EvanFar_ 10 місяців тому +13

    legend has it byte can explain anything in anime terms

  • @UnusedHandle
    @UnusedHandle 10 місяців тому +41

    can you explain it in fortnite terms

    • @MrMcCorkerMann
      @MrMcCorkerMann 6 місяців тому +32

      So the video creator explained in a previous nick eh 30 video how to crank 90s for a certain amount of time without stopping. But one person was a bit of a default and couldn't figure out how to continuously crank 90s without accidently boxing himself like a fishy. So the video creator made a new nick eh 30 video on how to crank 90s forever but this time he explained it in a way that even defaults can understand. (I believe it was Albert Einstein who said time is irrelevant, so no I am not sorry for responding 4 months late in the middle of the night)

    • @GDX0702
      @GDX0702 5 місяців тому +10

      ​@@MrMcCorkerMannbro literally describes it, i aint gonna complain, this shit's funny as fuck

    • @JustAMehCat
      @JustAMehCat Місяць тому

      ​@@MrMcCorkerMannTY I need the explanation too!

    • @Imhappy440
      @Imhappy440 Місяць тому +1

      ​@MrMcCothrkerMann bro this is so good I'm addicted
      Jk im new

  • @fleggy5050
    @fleggy5050 10 місяців тому +8

    One more thing I see in for loops often is "pairs" and "ipairs". I've been struggling with for loops for whatever reason even tho they are pretty simple and this video was perfect for me but I still dont understand those two.

    • @byteblox100
      @byteblox100  10 місяців тому +2

      They’re outdated, don’t use them

    • @Phoenix-ox8cz
      @Phoenix-ox8cz 10 місяців тому

      pairs are for dictionaries and ipairs are for arrays, but you don’t need to use them cause you can just loop through both of them without pairs or ipairs.

    • @Ako_Shiba
      @Ako_Shiba 10 місяців тому +1

      ​@@Phoenix-ox8czwhat should I be using instead of for i,v in pairs() loops?

    • @WinterStormMeow
      @WinterStormMeow 10 місяців тому

      ipairs is if your table looks like {‘A’, ‘B’, ‘C’}
      pairs is if your table looks like {A = 1, B = 2, C = 3}

    • @fleggy5050
      @fleggy5050 10 місяців тому +1

      Wait so it was used to differentiate between arrays and dictionaries but it's just not necessary anymore?

  • @vrfrenzy8451
    @vrfrenzy8451 10 місяців тому +1

    thanks, for loops there is one random part to it that my brain couldn't wrap around till this

  • @Steven_tops
    @Steven_tops 18 днів тому

    YOU SAVED MY LIFE WITH THIS TUTORIAL KEEP IT UP!!!!!!!!!!!!!!!!!!!!!!

  • @somenerd8139
    @somenerd8139 10 місяців тому +15

    Honestly, I think you needed a script for this one. It's hard to explain a more basic concept off the top of your head, and I feel like you didn't explain clearly or well enough. No offense to you though, it's not easy to do.

  • @SanityLostt
    @SanityLostt Місяць тому

    quick explanation for "for loops" for i - - means index for i = 1 - - means how many times i changes, 10 - - how many times it will loop for i = 1, 10 do - - execute code here

  • @Nixo77
    @Nixo77 25 днів тому

    That thumbnail is genius

  • @JustA1ex2465
    @JustA1ex2465 7 місяців тому +2

    guys I think this might be a JOJO reference 🤯

  • @Morktin
    @Morktin Місяць тому

    I can't understand why need to add variable, like why you can't do without index variable

  • @gointorealheaven-jj5od
    @gointorealheaven-jj5od 10 місяців тому

    Dude, this is AWESOME for making a game.
    Thanks thou

  • @Griffin_545
    @Griffin_545 10 місяців тому

    my brain is still trying to process this but i kinda understand it more

  • @theaveragefryingpan-od8mg
    @theaveragefryingpan-od8mg 10 місяців тому

    thank you so much for this :D

  • @AmAntKing
    @AmAntKing 10 місяців тому +1

    Could you explain the touch function, and how to make them work with clones of an object?

    • @byteblox100
      @byteblox100  10 місяців тому

      local newPart = part:Clone()
      newPart.Touched:Connect(function())

    • @AmAntKing
      @AmAntKing 10 місяців тому

      @@byteblox100 Ty

  • @TotallyNotFlad
    @TotallyNotFlad 5 місяців тому +1

    can you explain it in brainrot terms?

  • @LoganLatios
    @LoganLatios 10 місяців тому +2

    "explaining roblox loops in anime turms"
    kore ga *requiem* da.

  • @Spaghettiman26354
    @Spaghettiman26354 10 місяців тому

    Imma watch this tomorrow cuz i'll go to sleep in a bit

  • @One.Only223
    @One.Only223 4 місяці тому

    So do I use this to call out variable in my work easier like is there a way to say if this happens then print whatever is in key 2 I just don’t understand what to use it for really

  • @andreyromashchenko8967
    @andreyromashchenko8967 4 місяці тому

    Being as stupid as i am, i will just have to think of it as: “i” will numerize, “v” will recognize. But what are loops good for aside from giving a number of things you have in your table, and the names of those things?

  • @whar245
    @whar245 Місяць тому

    instructions unclear, i am not 5

  • @Rad1ation
    @Rad1ation 4 місяці тому +1

    Tbh for loops in python is so different.

  • @gocrucial
    @gocrucial 21 день тому

    thank you

  • @froxdoggaming3385
    @froxdoggaming3385 10 місяців тому

    I had no idea this was even called a "for loop" before this video. I have no fucking idea what it means. i keep seeing this in scripts like "for i = v do" or whatever. WHAT IS I AND V???? WHY DOES I = V AND WHAT DO THEY DO FOR??? AND WHY ARE THEY IN PAIRS????? All i knew was that it had to do with tables and randomization...

  • @gggthereal
    @gggthereal 10 місяців тому

    Can you make a tutorial on marketplace service

  • @adimemo2134
    @adimemo2134 10 місяців тому +2

    wow legendary. BUT REMEMBER! YOU SHOULD LOOP WITH FUNCTIONS. MAKE A FUNCTION AND CALL THAT FUNCTION INSIDE OF IT TO CREATE A LOOP! Its a ton better than the normal "While" or "For" loop since its faster. There is a video proving it (the video: ua-cam.com/video/hOdxbcfqLEc/v-deo.htmlsi=CX7yoeJOPifoQAeQ )

    • @patata8457
      @patata8457 10 місяців тому

      ??

    • @fleggy5050
      @fleggy5050 10 місяців тому

      Doesnt that just make it run forever therefore crashing roblox? Is this a troll comment lol?

    • @sed7890
      @sed7890 10 місяців тому +1

      recursion takes more stuff to write, would be just quicker to write a for or while loop.

    • @somenerd8139
      @somenerd8139 10 місяців тому +4

      dude, no one gives a shit about these incredibly small micro-optimizations. The performance will not change nearly enough for it to be worth writing all that extra shit.

    • @aoqia
      @aoqia 10 місяців тому

      @@sed7890 this

  • @dylan2-ud9yd
    @dylan2-ud9yd 10 місяців тому +1

    Explain velocity in black people terms

  • @VaIen1
    @VaIen1 3 місяці тому

    Thanks pookie beat❤

  • @Fishion.
    @Fishion. 10 місяців тому

    What about "in pairs" and "in ipairs"???

    • @byteblox100
      @byteblox100  10 місяців тому

      Outdated

    • @Nesquick5678
      @Nesquick5678 9 місяців тому

      @@byteblox100 so these things are just useless? i've used them all the time lol

    • @SadlekAski
      @SadlekAski 6 місяців тому

      @@Nesquick5678 outdated ~= useless.

    • @RoProgram
      @RoProgram 3 місяці тому

      ​@@byteblox100​ ok what else can I use for in pairs

  • @zubedube
    @zubedube 10 місяців тому

    while loops next!

  • @CornfloweRR
    @CornfloweRR 10 місяців тому

    Uh i was here to see u going full on anime terms...

  • @1Name8R
    @1Name8R 10 місяців тому

    Hey Bro i need help with practicing i can't even make an obby even though i learned all the basics.

    • @byteblox100
      @byteblox100  10 місяців тому

      Look out for the next vid :)

    • @1Name8R
      @1Name8R 10 місяців тому

      ALR!!!@@byteblox100

  • @victorien3704
    @victorien3704 10 місяців тому +2

    The amount of people who don't know how to use a for loop is concerning.
    I think a mistake most new roblox scripters do is try to learn base concepts of programming through a complex langauge like LUA. Instead what you should do is learn the base concepts of programming through any video series on youtube and then learn LUA once you've trained on them. There is a semi-programming langauge called "Pseudocode", it helped me learn how programming actually works, but you can learn through other langauges like python that have a lot of good explination videos. I didn't understand ANY roblox scripting tutorials ever, until i started my computer science class and actually learned how programming works and the fundementals like hexadecimal and binary, character codes, etc. the problem is there isn't much good videos explaining LUA as if you're new to programming, instead they try to teach you how to make a game work instead of actually learning, which is a huge problem, especially if you want to get better at programming later on.

    • @jonathan10007
      @jonathan10007 7 місяців тому

      what worked for me is brute forcing learning lua as then your brain is more accustomed to the language through so much trial and error

  • @riffler9929
    @riffler9929 5 місяців тому +1

    As a 5 year old i didn't understand anything

    • @SPYARMYFFFF
      @SPYARMYFFFF 5 місяців тому

      As 9 year old I understand

  • @JustAnRandomRobloxPlayer371
    @JustAnRandomRobloxPlayer371 2 місяці тому

    gugudada😭

  • @mrz3134
    @mrz3134 10 місяців тому

    your the youtuber i eat my food to

  • @rxdact
    @rxdact 10 місяців тому

    I LOVE BYTEBLOX 💯

  • @on3guygames
    @on3guygames 2 місяці тому

    Okay you explained it, but you didn’t show anything practical in a game.
    Show a for loop that that has gameplay mechanics so players understand. People aren’t making games that just print words in an output window

  • @Alleysss
    @Alleysss 10 місяців тому +2

    jojo reference >:)

    • @ARTURMep
      @ARTURMep 10 місяців тому +1

      Yes. I am

  • @whatsaname2usern
    @whatsaname2usern 3 місяці тому

    now do lua!!

  • @Daisukiii
    @Daisukiii 10 місяців тому

    Omg not the anime terms 😭

  • @danzstuff
    @danzstuff 10 місяців тому

    Explain it in miencraft terms

    • @fusion.studioX
      @fusion.studioX 4 місяці тому +1

      so basically its like the infinite redstone loop when you quickly place and break a redstone torch, but you can modify it to run as many times as you want instead of forever

    • @fusion.studioX
      @fusion.studioX 4 місяці тому +1

      and you can also make it run as many as amount of items in a chest

  • @rangemango
    @rangemango 6 місяців тому

    TYSM I LOVE YOU AWAAAWAAWAAWAWWAWAAWAWAWWAWAWAWAWAWWAWAWAWAWEAWAQWAWWAWA

  • @_klaxon
    @_klaxon 10 місяців тому

    cool

  • @bingymee
    @bingymee 10 місяців тому

    a

  • @mini_thing
    @mini_thing 10 місяців тому

    Waow 1 minute ago

  • @lorenplays3548
    @lorenplays3548 10 місяців тому

    BEFORE 10 MINS!

  • @eycho8099
    @eycho8099 10 місяців тому

    @1DiamondKing he did it