Built In Functions - Roblox Scripting for Beginners #9

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

КОМЕНТАРІ • 525

  • @AlvinBlox
    @AlvinBlox  5 років тому +150

    Don't forget to use Star code ALVINBLOX when buying Robux or Roblox Premium to support my channel at no extra cost! Thanks!

  • @RolePlayJay
    @RolePlayJay 5 років тому +207

    Alvin, everytime you upload a video, it helps me with at least one thing in Roblox studio. Although I am not the best scripter, I never would have been able to start learning lua and other code without you. The types of things that you make on Roblox inspire me to make my own games and keep trying, even when my script doesn’t work.
    Thanks for all of your help!

    • @AlvinBlox
      @AlvinBlox  5 років тому +29

      No worries!

    • @Issemoran
      @Issemoran 4 роки тому +1

      Omg

    • @u-bum
      @u-bum 4 роки тому +1

      hie jay from ryg :)

    • @hlflifeenjoyer6176
      @hlflifeenjoyer6176 4 роки тому +1

      Yeah I even write on my NoteBook to keep this Datas like Variables,Functions Etc

    • @pr0g4m3rgyt
      @pr0g4m3rgyt 2 роки тому

      @@hlflifeenjoyer6176 Same

  • @ore1628
    @ore1628 5 років тому +253

    10:31
    "And all these thicc children"

  • @ealy3545
    @ealy3545 4 роки тому +105

    Alvin: 11:42
    me: you murderer.

  • @XMinosX
    @XMinosX 2 роки тому +7

    you're such an amazing teacher. I've actually been using your lessons to code because I joined a group of people recently who have a creature game they want to make but we don't have a programmer yet so I decided to try and learn, though I also do the art for the creatures. I'm super excited to keep learning from these videos and hopefully really be able to make a game with what I've learned from you.

    • @therealgungus160
      @therealgungus160 Рік тому

      update?

    • @haniboutlat3711
      @haniboutlat3711 Рік тому

      Hey there! Do you mind sharing some tips for building in Roblox? Sorry for bothering btw.

  • @Danido6809
    @Danido6809 5 років тому +65

    I saw the background cycle, you should definitely do a tutorial on a day/night cycle

    • @camryn8980
      @camryn8980 4 роки тому +8

      yeah i stared at my screen for a good 20 seconds waiting for the moon to speed by at 10000 miles an hour but nothing happened so i was like ok

    • @jayfontanilla7026
      @jayfontanilla7026 4 роки тому +1

      moon animator

    • @amirmohammadalizadeh5040
      @amirmohammadalizadeh5040 4 роки тому +2

      Yea he must really learn it to us

    • @topgearmc8285
      @topgearmc8285 3 роки тому +7

      There is a Tutorial on UA-cam, but from Roblox itself.

    • @sparrow3394
      @sparrow3394 2 роки тому

      @@jayfontanilla7026 that’s not what moon animator is for…

  • @Swan_Land
    @Swan_Land 4 роки тому +60

    "These are the children because they are inside of them"

  • @ryze36
    @ryze36 4 роки тому +4

    bro ur the best guy ever, i've always wanted to learn how to script but it seemed like its alot to learn and you need to wait alot so you can make a proper script but now im at your 9th lesson and this is surprisingly not boring as it is at school and its fun!

  • @Tommy-hl2ic
    @Tommy-hl2ic 5 років тому +3

    Thx for making the beginner scripted series Alvin! I knew most of the videos you did, but you made me understand them even better than any other youtuber can do! I enjoy watching your tutorials! Keep up the good work!

  • @aguy6142
    @aguy6142 4 роки тому +20

    nobody:
    absolutely nobody:
    people who decide to watch an AlvinBlox video after a year: WoW bRo YoUr VoIcE cHaNgEd!

    • @sortrec7718
      @sortrec7718 4 роки тому

      no one asked

    • @4w24_
      @4w24_ 4 роки тому +4

      @@sortrec7718 About you

    • @eloelz56
      @eloelz56 3 роки тому +1

      @@sortrec7718 lmao one whole year and mans not even gotten one person to agree with him

    • @qJusy
      @qJusy 2 роки тому

      @@eloelz56 2 now

  • @SnatchedOwl1289
    @SnatchedOwl1289 4 роки тому +7

    thank you so much, i really like how you explain scripting in the most simple way possible, i love ur vids

  • @SnatchedOwl1289
    @SnatchedOwl1289 4 роки тому +12

    how the hell is this man making scripting fun, just how, like its so fun man

    • @arthurhero2794
      @arthurhero2794 2 роки тому

      so true Alvin is like always so kind and is like taking free tuition. like almost 99.99% of the people here who concentrates on everything he says are to learn scripting for sure.

  • @deli8878
    @deli8878 4 роки тому +339

    Wait(5)
    Earth.Life.HomoSapiens.MyMom:ClearAllChildren()
    Ok so guys I started the script and everything seems g

    • @cyanproduct
      @cyanproduct 4 роки тому +21

      Under rated comment lol

    • @hedgehog8485
      @hedgehog8485 4 роки тому +34

      local Find = Earth.Dead.Humans:FindFirstChild("Daler Karimov
      ")
      If find then
      find.Parent = Earth.Life
      end
      There you should be alive now Daler Karimov.

    • @nuclear_reactor5x5
      @nuclear_reactor5x5 4 роки тому +8

      No it’s Universe.Earth.House.Mom:ClearAllChildren()

    • @epicfilms4life507
      @epicfilms4life507 4 роки тому +9

      @@hedgehog8485 ah but you see you have defined the variable as "Find", but when you tried to call it you have spelt it as "find", meaning Daler is still dead. RIP Daler

    • @ChompDead
      @ChompDead 4 роки тому +2

      Yahya Ali instead, you couldve did this:
      local Find = Instance.new("Daler Karimov")
      Find.Parent = Earth.Life

  • @MattBlox360
    @MattBlox360 4 роки тому +3

    I would never have been able to learn Lua code and other code without you and your amazing videos. because of this I also keep trying and never give up even if my script doesn't
    't work

  • @mreggnoggin
    @mreggnoggin 5 років тому +17

    Wow. I Haven’t watch you in 2 years, and I time did it’s thing to your voice

  • @smoregaming9845
    @smoregaming9845 3 роки тому +4

    If you need help with parent and child look in the properties of the thing you want to find the parent for and it should be there but thanks for all you've done Alvin your a real one :)

  • @Pharrell1
    @Pharrell1 5 років тому +40

    Make a tutorial on how to make end game results. (Like MVP and that)

  • @domtu7129
    @domtu7129 2 роки тому +1

    quick overview
    Built in Functions are Roblox's premade functions and there are 2 types of built in functions: Member functions and Global functions.
    AlvinBlox mentioned 5 basic Built in functions that are useful.
    Member functions are functions that affect an object, while Global functions affect the script.
    To use a Member function you need to define what part you want and then type a ( : ), then the function you want to use.
    Example: game.Workspace.part:Destroy()
    To use a Global function you type it in in what spot of the script you want it to be in, global functions appear blue.
    Example: wait(5)

  • @angrycommentman6601
    @angrycommentman6601 4 роки тому +47

    Murderer: destroy the child
    Scripter: ok. :ClearAllChildren()
    Murderer: ok how did you say brackets

    • @sammleczko
      @sammleczko 4 роки тому

      @@thunderr3869 r/whoosh

    • @noobsunited5059
      @noobsunited5059 4 роки тому

      @@skymbuc9049 r/Igotreddit

    • @DesiredLucas
      @DesiredLucas 4 роки тому

      @@noobsunited5059 r/noboyasked

    • @foffrz
      @foffrz 3 роки тому

      @@skymbuc9049 r/WhoooshHas3Os

  • @mateuszjasnos5786
    @mateuszjasnos5786 2 роки тому

    bro i have two words to say: thank you! like you're making good toturials and make scripting fun and easy

  • @octojuice7278
    @octojuice7278 4 роки тому

    alvinblox tutorials are literally the only scripting tutorials i can understand. thank you alvinblox

  • @rslashwoooshifgay9801
    @rslashwoooshifgay9801 5 років тому

    Wow! I’m back from 2 years, and your voice is so different! This video also helped me a lot, thank you,

  • @merma9503
    @merma9503 4 роки тому +80

    *"hopefully, it will get destroyed."*

  • @YouGamer50501619
    @YouGamer50501619 5 років тому +14

    I remember that soft voice you had near the beginning of your youtube channel awwww. Lol

  • @penguinphd3019
    @penguinphd3019 3 роки тому +1

    Wow, AlvinBlox I know how to code in python and this series was VERY easy to pick up! Every time I watched one of your videos it made me want to try something on my own to see if it works and it was just a feeling I didn't get while I learned python. Thanks so much for making these vids I LOVE THEM!!!!

    • @citedwriter885
      @citedwriter885 2 роки тому

      same bro

    • @citedwriter885
      @citedwriter885 2 роки тому

      when i saw the first episode of this series, when he was printing a number i thought he was gonna type
      print(str(5048))

  • @ProdByALFTH
    @ProdByALFTH 4 роки тому

    bruh without you i wouldnt know what im doing on studio and id make trash games with no scripting and hardly any effort tysm and keep up the good work mate ur doing well

  • @208Roblox
    @208Roblox Рік тому

    you make very good tutorials i didnt thought i was gonna ever learn LUA

  • @joshbongalos213
    @joshbongalos213 4 роки тому +1

    I'm starting to forget everything you said from the beginning so had to rewatch again

  • @notsorookie2752
    @notsorookie2752 4 роки тому +2

    Thank you for the clone one, Now I know how to reset Maps!

  • @ultimatesheep
    @ultimatesheep 3 роки тому +4

    coding in a nutshell:
    Parent:findfirstchild("Brat")
    Brat:Destroy()

  • @HyperLeopard
    @HyperLeopard 4 роки тому

    All the tutorials I have been putting wait in some parts and I made it work 🙂

  • @mianreplicate
    @mianreplicate 5 років тому +1

    Interesting, I managed to teach myself scripting but if it wasn’t for you I wouldn’t have been able to get started :)

  • @ondras2219
    @ondras2219 5 років тому +17

    Hi Alvin, i am founding like 1 year of script where "If player is in some bath "aka i think some Part" then he got let say points 2 times added to stats" if u know in Super Power Training simulator i mean something like (city port) or tornado if u know game u know what i mean so if u can, please make video or message me back thanks you, Ps: i looked anywhere [Like so he see please]

  • @caspasaur
    @caspasaur 4 роки тому +20

    Reminder that:
    local myClone = game.Workspace.Part:Clone()
    myClone.Parent = game.Workspace
    and
    game.Workspace.Part:Clone().Parent = game.Workspace
    both create the same duplicate part. It just gets rid of the variable created with "local myClone". Which means if you want to create 5 parts of the same block, the script would look like this:
    local myClone = game.Workspace.Part:Clone()
    myClone.Parent = game.Workspace
    myClone.Parent = game.Workspace
    myClone.Parent = game.Workspace
    myClone.Parent = game.Workspace
    myClone.Parent = game.Workspace
    or
    game.Workspace.Part:Clone().Parent = game.Workspace
    game.Workspace.Part:Clone().Parent = game.Workspace
    game.Workspace.Part:Clone().Parent = game.Workspace
    game.Workspace.Part:Clone().Parent = game.Workspace
    game.Workspace.Part:Clone().Parent = game.Workspace
    They both do the same, but with the variable the code just becomes a lot more structured.

    • @Andrew-nl4jf
      @Andrew-nl4jf 2 роки тому +4

      i = 0
      while i < 5 then
      game.Workspace.Part:Clone().Parent = game.Workspace
      i =+ 1
      end
      less verbose way to do it

    • @izih
      @izih Рік тому

      @@Andrew-nl4jf what does i translates to

    • @izih
      @izih Рік тому

      @@Andrew-nl4jf I apologize for my condolences but it seems that the code is actually
      i = 0
      while i < 5 do
      game.Workspace.Part:Clone().Parent = game.Workspace
      i += 1
      end
      If I am wrong, I am sorry again

    • @somedude8728
      @somedude8728 Рік тому

      @@izih yeah you wrote it right btw

  • @cupman9821
    @cupman9821 5 років тому +3

    ClearAllChildren() will clear all the Objects inside it like "workspace:ClearAllChildren()" it will remove parts mesh part wedge ands any kinds of part will be removed from workspace even a player model will be removed too and it cannot remove the "Camera" , "Terrain" from the workspace.

  • @MachiavelIi
    @MachiavelIi 4 роки тому +7

    R.I.P
    Part
    00:00 - 5:15
    “I just want to be in a game...”

  • @braydensimpson7201
    @braydensimpson7201 2 роки тому

    My guy Alvin Is such a big help, Coding is fun!

  • @tb-yy6yf
    @tb-yy6yf 5 років тому +3

    Hey, I love your vids so much. By the way, do you have plans for doing a tutorial for GUIs?

    • @penguinphd3019
      @penguinphd3019 3 роки тому

      You should watch TheDevKing's GUI Tutorial series it is very helpful!

  • @italie7615
    @italie7615 4 роки тому

    I am starting to learn lua and your videos are helpful

  • @thecosmicminer5589
    @thecosmicminer5589 5 років тому

    Finally new alvin blox vid, your
    Tutorials are the best

  • @arenzion6952
    @arenzion6952 4 роки тому +9

    Once he guessed how I was wondering about print being useful, I knew, he was the chosen one.

  • @Devil_edits_op
    @Devil_edits_op 2 роки тому

    alvin your the best now i can start coding i didt anything like anything you helped me a lot bro

  • @TheScorched
    @TheScorched 4 роки тому

    Dude, I am obviously gonna use your star code when buying robux, you are saving me money, I have learned alot from this

  • @revasredcanary8020
    @revasredcanary8020 4 роки тому +3

    "has no more children, they've all been destroyed"

  • @guywithahoodie7859
    @guywithahoodie7859 4 роки тому

    You do really teach me, You taught me/Are teaching me better than those creator challenge things

  • @cookiedev8527
    @cookiedev8527 4 роки тому

    I needed this for the game I am working on. Wowwww nice!

  • @fabiiic-ops8600
    @fabiiic-ops8600 4 роки тому

    Before I watch the Video I press Like because I know it will be GOOOOD! Thanks Buddy

  • @subtomymaindealthereal1136
    @subtomymaindealthereal1136 4 роки тому

    Thank you a lot I feel like you are getting me somewhere on my journey to make a game

  • @dedley2664
    @dedley2664 4 роки тому +3

    Press F to pay respect for the children of that part. They were a happy family but were murdered by the swift judgment of the script.

    • @matthrew
      @matthrew 3 роки тому +1

      Wait (2)
      Print ("F")

  • @glennochieng7576
    @glennochieng7576 4 роки тому

    thank you Alvin for your vids they are really helpful and you explaining it well

  • @joesutt7432
    @joesutt7432 5 років тому +6

    Hi Mr. Blox of Alvin. I was looking at other UA-cam videos about how to set a safe zone and coding for 2 hours and none of them worked so can you make one since you are the best youtuber I know
    Thank you for you service
    To Mr.Blox of Alvin

  • @londonooga3350
    @londonooga3350 2 роки тому

    DUDE THIS IS HELPING OUT SOOOOOOOOOOOOOOOOOOO MUCH IM SUBING

  • @ecarteo
    @ecarteo 4 роки тому

    If someone's watching this in august 2020
    Just want to remember that you can also use warn() like a print() they are similar and they work the same, They just change the color of the print

  • @Itz_mrcmorkovcapybara2
    @Itz_mrcmorkovcapybara2 2 роки тому

    Great explanation! Your videos are really helpful! 👍

  • @sorexna
    @sorexna 3 роки тому +1

    the returning tutorial was more confusing than this one, this tutorial is actually easy.

  • @commandblockgal7396
    @commandblockgal7396 5 років тому

    I miss your old voice, _they grow so fast_

  • @ultimatetroll_yt
    @ultimatetroll_yt 2 роки тому +1

    You're really helpful, clear and easy to understand and follow! Thank you for these amazing videos! :D

  • @yellopz
    @yellopz Рік тому

    This is where it gets fun.

  • @jjeffy10
    @jjeffy10 3 роки тому

    TY ALVIN BLOX I LEARNED A LOT FROM YOU

  • @InsoiDev
    @InsoiDev 4 роки тому +1

    I just learned today how to make a lag game with this

  • @SwiftlySev
    @SwiftlySev 4 роки тому +1

    Roblox studio do be Joseph Joestar guessing your next line of code

  • @techhie9900
    @techhie9900 5 років тому

    I still wish I was a member but keep up the good work Alvin!

  • @dragon1x158
    @dragon1x158 3 роки тому +1

    Hey Alvin can you halps me I am trying to make a script that will respawn a part that I have created with a function every 5 seconds. It will delete it then respawn it in the same position again. I cant find what i am doing wrong. Here is the script:
    function RespawnPart()
    local part = Instance.new("Part")
    part.Anchored = false
    part.Color = Color3.new(0.384314, 0.219608, 0.109804)
    part.CanCollide = true
    part.Material = Enum.Material.Wood
    part.Position = Vector3.new(-1, 0.5, 6)
    part.Name = "Car1"
    part.Parent = workspace
    end
    local x = 25
    repeat
    RespawnPart()
    wait(5)
    game.Workspace.Car1:Destroy()
    until x == 30

  • @jaredloveless
    @jaredloveless 4 роки тому

    Wait is the most useful one IMO, but I'm just learning.

  • @Fabianthaguy
    @Fabianthaguy 3 роки тому +1

    I've seen this video like 5 times for reference but everytime he says "They are Children." at 10:20 it always catches me off guard

  • @wis-
    @wis- 3 роки тому

    Alvin belike: "so you do game.Workspace.part:destroy()"
    Part belike: "Please dont destroy me"

  • @andreibotofan6988
    @andreibotofan6988 5 років тому

    Epic video as always. tThanks for the lesson :D

  • @MatteoP04ita
    @MatteoP04ita 5 років тому

    Awesome as always

  • @pep152
    @pep152 2 роки тому +1

    if i do something like
    lcoal part = game.workspace.part:clone
    part.parent = workspace
    part:clear all children
    how would i make it clear the children of both parts?

  • @Issemoran
    @Issemoran 4 роки тому +1

    Thank you

  • @blackpenguin1695
    @blackpenguin1695 Рік тому

    ppl: "inteligence"
    alvin blox: "inetlisence"
    me: "intelectual"
    smart ppl: "AI"
    community:"a very smart person"

  • @jennm3170
    @jennm3170 5 років тому +1

    Can you make a video on a christmas prize calendar??

  • @TheRealOderless635gnat
    @TheRealOderless635gnat 4 роки тому +1

    if youre wondering how to make it wait in python use this type in import time at the top line and then use time.sleep() and put the seconds u like
    make sure that its correct as well

  • @SamariumHelium
    @SamariumHelium 3 роки тому

    Amazing, even just as a refresher. Have you got/can you make something on data storage?

  • @EliezPaulino
    @EliezPaulino 5 років тому

    My gosh. Your voice. You’ve grown.

  • @maxplayz2631
    @maxplayz2631 3 роки тому +1

    In captions, sometimes when he is saying wait, it says he is saying weight

  • @dubblegammer9366
    @dubblegammer9366 2 роки тому

    He teaches me so much

  • @snoman2017
    @snoman2017 3 роки тому +1

    My favourite scripting tutorial, learning how to delete children

  • @SkullsDev
    @SkullsDev 2 роки тому

    Destroyed can be great for map voting because once the map is voted on you can close the old map and open the new map uses a instance.new

  • @pixelgang2967
    @pixelgang2967 5 років тому +1

    Hey Alvin can you make a video were when you level up in the game you can unlock stuff and buy stuff with an in game currency?

  • @bhumiraksmith4656
    @bhumiraksmith4656 4 роки тому

    I liked your video, but I don't understand why you have to put the clone part into a variable other than making it easier to type in the future. This is because you can code in (game.Workspace.Part:Clone().Parent = workspace) and it work just like it intended. Good practices perhaps to write it in variables?

  • @warudikointothediko
    @warudikointothediko 5 років тому

    Thank u Alvin!

  • @milanmajoor505
    @milanmajoor505 5 років тому +1

    You make awesome videos that help me a lot

  • @petarkil
    @petarkil 4 роки тому

    10:30 indented means on your key board is pressed tab, you can see those used in functions, basically defining is something in something or is it not.
    function idk()
    print("something") (youtube neither alot of platforms for searching etc dont support indention or tab character)

  • @emmanueledits
    @emmanueledits 5 років тому +1

    Hey Alvin Blox!I have been trying to do the tutorial sword game but it wont work for some reason! can you help me?

  • @aperson2699
    @aperson2699 4 роки тому +1

    11:53 If you wrote game.workspace:ClearAllChildren() would it get rid of everything in the workspace?

    • @JLChaos
      @JLChaos 4 роки тому

      yes
      that would make a great virus for people who make viruses lol.

  • @Noblelinski
    @Noblelinski 3 роки тому

    With this knowledge, I shall build a grand army for the Republic!

  • @alfredodeleon307
    @alfredodeleon307 2 роки тому

    I'm so confident, yeah, I'm unstoppable today

  • @vexbolt8031
    @vexbolt8031 5 років тому +1

    Ur pc fast, what’s kind u have?

  • @arshinv7848
    @arshinv7848 3 роки тому

    why do we need the parentheses in the built in functions?? like for clearallchildren and clone? alvin pls tell me because i saw scripts where people put something in the parentheses of Clearallchildren.

  • @ClockWiseIsAGreatDeveloper
    @ClockWiseIsAGreatDeveloper 4 роки тому +1

    guys just so you know these scripting tutorials still work in 2020

  • @GoDogArchives
    @GoDogArchives 5 років тому

    Never clicked so fast

  • @maxbuilder6801
    @maxbuilder6801 4 роки тому +1

    You know what's funny, he doesn't explain how to use the position command in one of his videos but explains AGAIN how to use the print and wait commands.

    • @Moonlight-ud2ln
      @Moonlight-ud2ln 4 роки тому

      Max Builder The position command is quite simple! :D you need to open the properties tab, then it will show a parts current position! It shows everything else in previous videos

  • @akimbokm2104
    @akimbokm2104 5 років тому

    Im so caught up that most of the videos are self explanatory just with a little guidance

  • @ZOMBYSPIDER
    @ZOMBYSPIDER 5 років тому

    Please do, "how to make a custom player list/leaderboard", these beginners scripting videos are helpful but most of us know this stuff and want other videos like you used to do, for example your "How to make a" videos. Please do this, I would greatly appreciate it! Thanks!

  • @Ksubscriberswithoutanyvi-gv4rm
    @Ksubscriberswithoutanyvi-gv4rm 5 років тому

    i made a game called Medieval Lifting Simulator, and couldn’t do it without your videos

  • @ewanbob10
    @ewanbob10 5 років тому

    You help me a lot with my games! Thank you!
    As well can you teach us how to make a game like a test.

  • @rusty9097
    @rusty9097 4 роки тому

    Do you have a Video for how to make a Helicopter script i've been trying to find a script for a Helicopter animation and sounds but i can't find any.

  • @genericgamer907
    @genericgamer907 3 роки тому

    that orange and black little app at the bottom scared me for a sec

  • @Puwgen
    @Puwgen 3 роки тому

    Alvin. Easier way with destroy is "game.Workspace.Part:Destroy()"