This Makes Roblox Programming Look Hard (Its VERY Easy!) | Roblox Studio

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024

Комментарии • 61

  • @stewiepfing539
    @stewiepfing539  4 месяца назад +7

    Have y’all heard of generics?

    • @Plixy1
      @Plixy1 4 месяца назад +1

      never

    • @workindad
      @workindad 4 месяца назад

      Yeah, I've been trying to understand types for quite some time. I can work out most of it except when I try to set types in OOP using players and characters. No matter what I do I end up with bunches of red lines throughout the code. I remove the types and the code works just fine so I never understand what to do. What types are a player, character and humanoid and how do I set it up?

    • @mile.9768
      @mile.9768 4 месяца назад

      yup, i code in Java

    • @DevL4k5hy4
      @DevL4k5hy4 4 месяца назад

      @@mile.9768 Same, Can also use generics with classes and variables

    • @brickwall2900
      @brickwall2900 4 месяца назад

      me when programming in Java

  • @bilocarrega
    @bilocarrega 4 месяца назад +16

    This is not something I would waste much time studying but knowing the basics of generics is enough for most developers

  • @kylehickmen1684
    @kylehickmen1684 4 месяца назад +11

    I just spent 2 hours last week wrapping my head around this and you create this NOW?!?

  • @Dr_mafario
    @Dr_mafario 4 месяца назад +11

    I used to code in C# so a lot of this made sense to me, but I didnt even know lua could do that. Epic!

    • @execute214
      @execute214 4 месяца назад +7

      only luau, vanilla lua doesn't have this

  • @d.d3740
    @d.d3740 4 месяца назад +3

    Thank you man, it feels feels like you help bridge the gaps of intermediate to advanced. Alot of the questions I find myself asking I can't find good answers for until I look at your channel

  • @retrohowl
    @retrohowl 4 месяца назад +7

    Looks like something that would come straight from math exams

  • @mad_jelly
    @mad_jelly 4 месяца назад +1

    this showed me what types are in like 2 minutes thanks

  • @berendberend702
    @berendberend702 4 месяца назад

    Great video! This is something I didn't quite understand about scripting yet, but it makes a lot more sense now. You should do a video about metatables sometime, they can be really powerful and I see a lot of people struggling with them.

  • @pantasiazx2
    @pantasiazx2 10 дней назад

    underrated vid 😢

  • @DevL4k5hy4
    @DevL4k5hy4 4 месяца назад +2

    This video made me wonder: What if I type define a table called Car and use the Lua OOP concept that is in roblox's devfourms and combine to type define an object called Car to code efficiently.

    • @DevL4k5hy4
      @DevL4k5hy4 4 месяца назад

      Will make OOPs more customizable.

    • @uremi.
      @uremi. 4 месяца назад

      typechecking with OOP is not a thing yet

  • @Hainlo0_0
    @Hainlo0_0 4 месяца назад

    nice video!😁

  • @JamesBey-fh7ej
    @JamesBey-fh7ej 4 месяца назад

    Keep up the good work with the videos

  • @booiiiip
    @booiiiip 4 месяца назад

    this is cool lol
    also can make a tutorial on how to make it so the bezier curve still going even when it reached to the end point
    I’m trying to make an attack that basically shoot paintballs up then fall down into players

  • @HasekoCh
    @HasekoCh 4 месяца назад

    It's simple but its abstract, I think that's what scares people away

  • @BreakfastKid
    @BreakfastKid 4 месяца назад +1

    i wanna ask where did you get those informations, i never knew all off those that your channel covered

    • @Monkeymario.
      @Monkeymario. 4 месяца назад +1

      i knew some of em before thiss vid but not all

  • @daewud
    @daewud 4 месяца назад

    type annotation and generics are powerful

  • @KashTheKingYT
    @KashTheKingYT 4 месяца назад +4

    ByteBlox if he was good:

    • @stewiepfing539
      @stewiepfing539  4 месяца назад +2

      Lol I don’t have a problem w him but his fan base is a lil crazy in his comments

    • @nebularzz
      @nebularzz 4 месяца назад +1

      @@stewiepfing539 his fans are horrible

    • @TommyflamRbx
      @TommyflamRbx Месяц назад

      @@stewiepfing539fr

  • @hike8932
    @hike8932 4 месяца назад

    Could you send some examples of use for this because i dont know why id use this

  • @tohmobile6384
    @tohmobile6384 4 месяца назад

    W tutorial

  • @taylozen
    @taylozen 4 месяца назад

    i feel so lucky right now, ive been learning type-checking and i couldnt find out how to designate a variable as a table. i kept googling it but i was getting a bunch of irrelevant stuff lol

    • @real-microsoft_word
      @real-microsoft_word 4 месяца назад

      Suphi Kaner’s type checking tutorial is a very useful resource for this stuff.

  • @onlyfreefiregg7000
    @onlyfreefiregg7000 4 месяца назад

    i told chat gpt 3.5 that : can you write a script using lua and using generics to print of input type is int value or bool value or string value
    and replay that :
    Certainly! In Lua, we can create a function that uses generics to handle different input types and print messages based on the type of the input. While Lua does not have a formal generics system like some other languages, we can achieve similar functionality by checking the type of the input.
    Here's a Lua script that demonstrates this:
    function printType(value)
    local valueType = type(value)

    if valueType == "number" then
    if math.floor(value) == value then
    print("The input is an int value: " .. value)
    else
    print("The input is a number (not an int): " .. value)
    end
    elseif valueType == "boolean" then
    print("The input is a bool value: " .. tostring(value))
    elseif valueType == "string" then
    print("The input is a string value: " .. value)
    else
    print("The input is of an unhandled type: " .. valueType)
    end
    end
    -- Test cases
    printType(42) -- int value
    printType(42.5) -- number (not int)
    printType(true) -- bool value
    printType("Hello, world") -- string value
    printType(nil) -- unhandled type
    printType({}) -- unhandled type
    can any one explain that?

    • @Xapelize
      @Xapelize 4 месяца назад

      you should tell him use LuaU not Lua, Lua doesn't have generics so chat gpt made random stuffs

  • @wverbrug1
    @wverbrug1 4 месяца назад

    whats the difference between what you did and just " : any"

    • @stewiepfing539
      @stewiepfing539  4 месяца назад +1

      any could be any data type. T is the type of the datatype you send in

  • @askshells
    @askshells 4 месяца назад +1

    what's the point of doing that, it just wastes time

    • @nebularzz
      @nebularzz 4 месяца назад +2

      it reduces possibilities for bugs

    • @feandal5274
      @feandal5274 4 месяца назад

      type checking for intellisense and autofill is incredibly useful

    • @CogTheSuit
      @CogTheSuit 4 месяца назад

      It's only useless if you don't do native code

    • @CogTheSuit
      @CogTheSuit 4 месяца назад

      @@nebularzz Not sure about that

    • @stewiepfing539
      @stewiepfing539  4 месяца назад +5

      @@CogTheSuit it does, the whole point of typechecking is to help you not make mistakes in your code. Typechecking doesn’t waste time and is here to help you

  • @justcool553
    @justcool553 4 месяца назад

    isn't that hard 😳
    0:14

  • @JoSanInk
    @JoSanInk 4 месяца назад +1

    seems useless.

    • @charger4299
      @charger4299 3 месяца назад

      Yeah Im honestly confused to Its pretty cool and could help if you are using the function and don't know what to type in argument but that should be rarely the case, I thought it would stop the function when it detected the wrong output type or argument type which would make it a useful tool but that is not the case after I played with it a little bit. Im interested to see how other people apply it.