Roblox ObjectValues Are Insanely Weird

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • 50% OFF COUPON WITH "DOUBLEBYTE" (ends in 3 days):
    linktr.ee/Byte...
    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/...
    You’ll also get 20% off an annual premium subscription!
    discord: / discord
    wondered how to make a main menu in roblox studio? or how to create a shop which has working GUI? ive made lots of 2024 roblox scripting tutorials about all the different bits of roblox to give you some up-to-date information about all of its properties and events.
    my goal is to simply give some insight on how to use the various features and instances roblox studio, and show you some fun stuff you can do with them. thanks for checking out this roblox scripting tutorial :)

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

  • @byteblox100
    @byteblox100  8 месяцев назад +5

    like my teaching style? give me your email so I can send you stuff
    byteblox.ck.page/c2af95d792

    • @Catlover我爱猫
      @Catlover我爱猫 8 месяцев назад

      ok

    • @CIA_Insights
      @CIA_Insights 8 месяцев назад

      I have a question if I have a model and I have a parts in there how can I move them all to that Position

    • @TheKillingCombo
      @TheKillingCombo 8 месяцев назад +1

      @@CIA_Insights
      do something like:
      model.PrimaryPart.Position = vector3.new(0,0,0)
      Or:
      Model:MoveTo(0,0,0)

    • @AnimeOfficalCW
      @AnimeOfficalCW 2 месяца назад

      @@CIA_Insightsafter 6 month did u find it out

    • @CIA_Insights
      @CIA_Insights 2 месяца назад

      @@AnimeOfficalCW yes I did

  • @oriad7483
    @oriad7483 8 месяцев назад +46

    values existed before custom attributes were added. They were added long after as a more practical solution, but instances that were just values stayed around to keep other games working.

    • @MinerGritz
      @MinerGritz 8 месяцев назад +1

      so does that imply that this could soon be deprecated?
      hmm...

    • @oriad7483
      @oriad7483 8 месяцев назад +2

      @@MinerGritz Maybe. But if custom attributes have been around this long, I think they'll just exist as an alternative. I doubt anyone would really miss it anyway

    • @somerandomgoanimator1820
      @somerandomgoanimator1820 8 месяцев назад +1

      ​@@oriad7483 Leaderstats would be completely broken

  • @MajesticUC
    @MajesticUC 8 месяцев назад +18

    2:05. Task.wait() runs twice as fast as wait() meaning it has twice the accuracy and also meaning it can wait at a minimum of 0.015 seconds as apposed to wait() which can wait for a minimum of 0.03. wait() also returns a second value storing the time that it stopped yielding at, which will make the yield time even longer!
    wait() can sometimes cause delay when it resumes the thread (stops yielding) due to performance issues. Overall task.wait() is just far superior

    • @rogenus
      @rogenus 8 месяцев назад +3

      Agreed. I've always used task.wait() since I discovered it

    • @ExoticFoxy
      @ExoticFoxy 8 месяцев назад

      Nah it's not
      I tested
      And task.wait slower

    • @berrysus4531
      @berrysus4531 8 месяцев назад +6

      @@ExoticFoxy me when i spread false information:

    • @joeplayzgames2625
      @joeplayzgames2625 8 месяцев назад

      Woah, majestic dev?

    • @ExoticFoxy
      @ExoticFoxy 8 месяцев назад

      @@berrysus4531 why would you

  • @cactisiusninja
    @cactisiusninja 8 месяцев назад +7

    5:53 you can't do that because by Default the character's model is set to Archivable = false (which means it can't be cloned and etc.) you would have to aet it to true first

  • @erky2264
    @erky2264 8 месяцев назад +1

    i've been programming in studio for 5 years now and actually i always ignored those attributes, never thought that they can store values like that, never even tried them out lmao

  • @bioeless
    @bioeless 8 месяцев назад +2

    For anybody wondering, the reason why the script works only when you use Instance:Destroy() and not when you delete it in the editor is because Instance:Destroy() doesn't actually delete the object, it sets it parent to nil; So the object still exits in game, just not under the workspace. When you delete an object in the editor, it is completely removed from the game's memory.

    • @a_username_lol
      @a_username_lol 8 месяцев назад

      :remove() or :Remove() sets it to nil not destroy

    • @bioeless
      @bioeless 8 месяцев назад

      @@a_username_lol It says in the documentation that :Destroy() sets the objects parent to nil; I've verified by checking the objects parent after using :Destroy() on it. If there's something I'm missing, please let me know.

    • @a_username_lol
      @a_username_lol 8 месяцев назад

      @@bioeless oh i didnt know i thought it just completely removed it well ok

  • @ramdom_player201
    @ramdom_player201 8 месяцев назад +2

    Custom attributes are fairly new, and so I never got used to using them. I prefer the original value instances because they show up independantly in the explorer and are good for configuration settings. The only time I would really use Attributes might be for backend scripting of stuff where I wouldn't need to manually access them.

  • @Fishion.
    @Fishion. 8 месяцев назад +2

    Last time I checked, you had 1.1k subs and I told you you were growing so fast! Look at you now! Almost 4k subs. Well deserved with such good content.

    • @byteblox100
      @byteblox100  8 месяцев назад +1

      it was all you bro

    • @nulsoph
      @nulsoph 8 месяцев назад

      @@byteblox100 You're the one that put in the work, aren't you?

    • @Player20XX
      @Player20XX 5 месяцев назад

      @@byteblox100 only 3 months and you're already at 18.5k, this is really insane, but don't get too cocky with it

  • @JayJay-ki4mi
    @JayJay-ki4mi Месяц назад

    Attributes can't be used to hold objects. For example, if I want to allow the user to select which rig/npc/object to apply my dialogue system to this won't work with attributes. Whereas if using an ObjectValue RBS will allow the user to use their cursor to select which object to apply it to.

  • @LuckyEcho
    @LuckyEcho 8 месяцев назад

    Yes, I totally watch you on my MCDonalds 30 minute break.

  • @swordlegend3256
    @swordlegend3256 8 месяцев назад +1

    2:08 wait() is kinda deprecated and slow task.wait() is better than wait() every way its more accurate more preformant ect

  • @boatExploits
    @boatExploits 8 месяцев назад

    4:49 it's bc when the game first starts, it launches all the scripts, when u do it outside of the script it deletes it from the games memory. When u do it in the script, it's still in games memory and therefore u can still access it through scripts, since the value is still there when u start the game

  • @isosta2373
    @isosta2373 8 месяцев назад +1

    They need to add instance references to attributes so i can make a solid serialization api for content based systems

  • @truemori6700
    @truemori6700 8 месяцев назад

    the reason that destroying it in studio vs destroying it in a script is different is most likely bcuz it stores the value before it gets destroyed. the parts got loaded in before the script did

  • @Juanitrox
    @Juanitrox 8 месяцев назад

    task.wait() runs on the minimum frame time of your computer, whilst wait() runs on a minimum of 1/30th of a second, meaning task.wait() can be any value over zero, as it runs on your computer render time, it means it can be 1/60th of a second (if you're playing at 60fps), 1/120th, 1/144th, etc. it all depends on the framerate, on the server, though, it runs at 60fps instead of 30, which makes it double as fast as wait()

  • @EliseyzScripts
    @EliseyzScripts 8 месяцев назад

    TYSM! I COULD MAKE A SKIN SYSTEM THAT VALUES EACH SKIN AS THEIR OWN VALUES AND NOT JUST A GUI!

  • @jaszczurka5069
    @jaszczurka5069 8 месяцев назад +1

    4:24 when destroying a part it's parent is set to nil and isn't garbage collected until scripts are doing something with it so basically it's still exist

    • @GetUrFunnyUp
      @GetUrFunnyUp 8 месяцев назад

      Debris fixes that right

    • @D_863
      @D_863 8 месяцев назад

      In Simple Term's, When you use :Destroy() It Does Set The Instance's Parent to a "GC Folder" and Lock's the Parent, It Also Disconnect's any Connection's to That Instance, and Etcetera.. Again This is Simple Term's and Ive just Woken up Midle of The Day so Yhea.. No Coffee Yet. (Dont Take my Answer as Truth But Just a Hint, I Dont Have My Coffee Yet and Such I'm Probally Just Saying Thing's as a Mad-Lad.)

    • @SquooshyShark1000
      @SquooshyShark1000 8 месяцев назад

      @@D_863 you talk like queen from deltarune

    • @D_863
      @D_863 8 месяцев назад +1

      ​@@SquooshyShark1000Thank's I Guess Lmao.. Hope you Have a Good Christmas Eve! :)

  • @Bingus4
    @Bingus4 8 месяцев назад +1

    how exciting

  • @the_god_killah
    @the_god_killah 8 месяцев назад +1

    Bro is posting everyday 🔥

  • @ChristopherMarquez-wn1sm
    @ChristopherMarquez-wn1sm 3 месяца назад

    coudn't you achieve the same (cloning a part) by placing the part into ReplicatedStorage and cloning that?

  • @LoganLatios
    @LoganLatios 8 месяцев назад

    i forgot attributes existed :D
    i will now never use values again

  • @Ralseee
    @Ralseee 5 месяцев назад

    attributes are too complicated to modify in scripts efficiently + takes too long to make a new one
    values is a better choice

  • @QUBIQUBED
    @QUBIQUBED 8 месяцев назад

    I get it! ObjectValues learn what your object is before the game starts, if you delete it before the game starts, it doesnt know what ur talking about. But it learns what the object is when the game starts, so it is unphased by its deletion

    • @pantommy
      @pantommy 8 месяцев назад

      :Destroy() doesn't "delete", it parents the part to nil. So the part still exists, it's just not in the workspace anymore.

    • @Ralseee
      @Ralseee 5 месяцев назад

      ​@@pantommyhow to delete a part completely

  • @debbieng3510
    @debbieng3510 8 месяцев назад +2

    Hi

  • @randomhuman69420
    @randomhuman69420 8 месяцев назад

    please do a video about meshparts next!

  • @ocanslair
    @ocanslair 8 месяцев назад +1

    woa

  • @x_gwb
    @x_gwb 8 месяцев назад

    SICK 🔥

  • @vrfrenzy8451
    @vrfrenzy8451 8 месяцев назад

    interesting

  • @Itz_Voxel_
    @Itz_Voxel_ 8 месяцев назад

    4:43 I'm not sure, But my prediction is that the object value before loading the game copies all of its properties or the actual part and then just has it as a value, but if you delete in studio, the object value has nothing to copy, THATS MY PREDICTION

    • @D_863
      @D_863 8 месяцев назад

      I Think It's Value is Just a PATH To That Instance, but When You Remove the Instance that's the "End Point" It's Technicly Nil/Null, But ofcourse If you Put a Difrent Instance at that "End Point" It will Fix that Nil/Null'ed Path. (Dont Take My Answer as Truth as Ive Litterly Just Woken Up Midle of The Day and I Havent had Coffee Yet, So It's Just a Hint/Opinion and I'm Probally Saying Thing's Like a Mad-Lad.) :)

  • @AisarRedux
    @AisarRedux 8 месяцев назад +1

    use while true do task.wait() instead of while task.wait() end, theres a whole doc about this :P

    • @coe_x
      @coe_x 8 месяцев назад

      Could you send that doc? I’m confused why having “while true do task.wait()” and “while task.wait() do” are different, they are the exact same if I’m not mistaken. while “true” do does just hold a Boolean, and while, do is just a loop

    • @MajesticUC
      @MajesticUC 8 месяцев назад

      @@coe_x firstly, the only reason why putting a wait in the while loop parameter works is because wait() returns a number. If roblox decides to change that, your script will break. Secondly, you tend to want to use a wait at the end of a loop.

    • @byteblox100
      @byteblox100  8 месяцев назад

      @@MajesticUC roblox will not commit any changes which will break scripts, unless those changes are meant to fix exploits/bugs, which isnt the case here.
      i see the point of waiting at the end of the loop, but when dealing with such tiny waiting amounts it doesnt really matter

  • @boatExploits
    @boatExploits 8 месяцев назад

    7:23 im not entirely sure if that's true or not, using the setattribute function in the cmd line: part:Setattribute("attributePart", workspace:FindFirstChild("AnotherPart"))

    • @rrya5109
      @rrya5109 8 месяцев назад

      u cant add objects into attributes

  • @ashtondrye102
    @ashtondrye102 8 месяцев назад

    Any Instance can be stored

  • @Skill_StrikeYT
    @Skill_StrikeYT 22 дня назад

    Can you datastore objectvalues?

  • @d_ucksy
    @d_ucksy 8 месяцев назад

    Can ObjectValues hold things inside ServerScriptService and ServerStorage? Since clients cannot access anything inside them, You can create a part in ServerStorage and an object value linked to it. If you try to clone the value from a local script, would it work? Or will it index nil?

    • @Sourley
      @Sourley 8 месяцев назад

      Value will not sync as it does not exist on the client, so nil

  • @Fallen_Prince69410
    @Fallen_Prince69410 8 месяцев назад

    Can you make a tutorial on how to make a role require a badge

    • @QUBIQUBED
      @QUBIQUBED 8 месяцев назад +1

      Read up on badge documentation

  • @Catlover我爱猫
    @Catlover我爱猫 8 месяцев назад

  • @666thmoab
    @666thmoab 8 месяцев назад

    2:11 its easier on the game

  • @rockyes3239
    @rockyes3239 8 месяцев назад

    can you crate attributes using scripts?

    • @byteblox100
      @byteblox100  8 месяцев назад

      :SetAttribute()

    • @rockyes3239
      @rockyes3239 8 месяцев назад

      @@byteblox100 i meant create

    • @Aadiyan1
      @Aadiyan1 8 месяцев назад

      ​@@rockyes3239thats actually how u do it

    • @cactisiusninja
      @cactisiusninja 8 месяцев назад

      That's what you do, if you set an attribute that doesn't exist, it creates it​@@rockyes3239

    • @byteblox100
      @byteblox100  8 месяцев назад

      @@rockyes3239 that's how you create them. SetAttribute takes two parameters; the name of the attribute and the value you want to set to that attribute, so something like SetAttribute("Cash", 100) will work.
      SetAttribute will create a new attribute if it cant find an existing attribute with the same name you gave it. So if we dont have a "Cash" attribute, it will create one, but if we already had a "Cash" attribute then it would just change its value

  • @sadge6430
    @sadge6430 8 месяцев назад

    Dhk

  • @sadge6430
    @sadge6430 8 месяцев назад

    Rhjo

  • @asshole124
    @asshole124 8 месяцев назад

    37th

  • @ChimkenCucumber
    @ChimkenCucumber 8 месяцев назад

    WWW

  • @SausageFingers06
    @SausageFingers06 8 месяцев назад

    dirty mac user

    • @byteblox100
      @byteblox100  8 месяцев назад

      Jonathan never liked you btw

    • @SausageFingers06
      @SausageFingers06 8 месяцев назад

      it doesnt matter i liked his son@@byteblox100

    • @QUBIQUBED
      @QUBIQUBED 8 месяцев назад

      :skull: