Beginner's Roblox Scripting Tutorial #10 - Events (Beginner to Pro 2019)

Поділитися
Вставка
  • Опубліковано 28 вер 2024
  • Beginner's Roblox Scripting Tutorial #10 - Events (Beginner to Pro 2019)
    Hey guys, in today's video I am going to be teaching you about roblox events. or events in roblox. Basically, events are things that are fired whenever roblox sees them happen. So things like when a part is touched, or anything like that. These events are also called RBXScriptSignals, but no one ever calls them that so you can probably just remember events. Anyways I hope you guys enjoy the video and I'll see you in the next one!
    Link to Beginner's Tutorial Series:
    • Beginner's Roblox Scri...
    -- Follow me on twitter! (my name is tapwater because thats my main channel): / realtapwater
    - Join my Discord Server to learn and meet other developers!-
    / discord
    --What is this series about and who is it for?
    So this series is meant for people who really want to learn exactly how to script, if that is you then I promise by the time you watch this whole series you will know exactly how to script on roblox. Anyways be sure to subscribe to see whenever I release a new tutorial and I will see you guys in the next one. Peace!

КОМЕНТАРІ • 735

  • @TheDevKing
    @TheDevKing  5 років тому +93

    Hey guys! Be sure to join the discord server if you have any questions or if you would like to meet me! discord.gg/FKcSyRh

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

      hi can you teach me how to make a build mode system ike bloxburg

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

      Ool man!

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

      Hi I'm in 2020 right now and sadly this is out dated can you make a new Roblox scripting tutorial (Beginner's)

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

      @@rumfel3 Is it really outdated?

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

      game.Workspace.AwesomePart.Touched:Connect(function()
      wait(7)
      if AwesomePart.Anchored == true then
      wait(2)
      AwesomePart.Anchored = false

      print"Ow you hurt me"
      end
      end)
      WHY IS IT NOT WORKING

  • @arunmoses2197
    @arunmoses2197 3 роки тому +173

    "I wasn't even busy I was just being lazy"
    Lol this is a relatable thing XD

  • @justfin3510
    @justfin3510 4 роки тому +156

    1:28 I swear my boy was gonna put hotdog XD

  • @justguy7290
    @justguy7290 5 років тому +142

    Thanks man! As soon as this video started and I seen you put touched I instantly said "is this how you can make they team doors on they games?" and instantly tried coding that myself and it worked all because of your help as beginner as that sounds I was so proud xd

    • @Zippy497
      @Zippy497 3 роки тому +6

      same with me but just doors in general

    • @ThomstudiosTheBest
      @ThomstudiosTheBest 3 роки тому +5

      True, is beginners are like, Woah I made this! Pros be like, Oh cool

  • @doggo6024
    @doggo6024 3 роки тому +35

    him: hey guys it’s the dev king
    captions: hi guys it’s the deaf king

    • @ThyBoiledOne
      @ThyBoiledOne 3 роки тому +9

      because captions are deaf

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

      lol this is the only recent comment ive seen

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

      Notice.

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

      @@WildDreamer19 Notice

    • @huz.editss
      @huz.editss 2 місяці тому

      @@amiroto8449 Year 3: Notice

  • @Giga_Kurtanidze
    @Giga_Kurtanidze 8 місяців тому +2

    This guy has one of the most high understanding of teaching on UA-cam. I would recommend to finish his series 100%

  • @malatromo
    @malatromo 2 роки тому +401

    To everyone watching this, make sure you give yourself mini-projects/assignments to do after learning something new! If you just watch without practice, you won't get better.

  • @xtreme808
    @xtreme808 3 роки тому +13

    Thanks so much for this, after watching this series so far I think I'll finally be able to code something myself instead copypasting scripts from tutorials to get the stuff i want.

    • @Animelise
      @Animelise 2 роки тому +3

      Yup. That is basically what I have been doing until I found out about these videos

  • @Clamo_
    @Clamo_ Рік тому +8

    Even though I'm watching this 4 years later, it helps so much. Thanks DevKing

  • @randomperson9997
    @randomperson9997 3 роки тому +21

    lets be honest: when he said that you could go to the next tutorial
    *you didn't*
    Edit: for those missing context, at the end he said that you can go ahead to skip to the next video but nobody wanted to because we are learning scripting

    • @eternity-308
      @eternity-308 3 роки тому +2

      This is false.
      and a lot of other people probably think that it's false aswell

    • @daddypyramid
      @daddypyramid 3 роки тому +3

      @@eternity-308 nah hes right because im about to go back and watch the first ten so i can correct my mistake of not writing anything down

    • @eternity-308
      @eternity-308 3 роки тому +1

      lol

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

      @@BottledSam oof I edited my comment. Forgot to add context

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

      @@BottledSam how is it so far

  • @bilocarrega
    @bilocarrega 3 роки тому +8

    Only a bit of people are here compared to the first episode, thanks for getting here!

  • @wisewastaken
    @wisewastaken 3 роки тому +11

    i love your tutorials i made a simple door open when button touched script from your tutorials (my first script) so if u wanna review it then here it is
    make sure you have a part called "Button" near a part called "Door" Resizing is optional
    local door = game.Workspace.Door
    local function open()
    door.Transparency = 0.5
    door.CanCollide = false
    wait(3)
    door.Transparency = 0
    door.CanCollide = true
    end
    game.Workspace.Button.Touched:Connect(open)

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

      good job!

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

      your script helped me make a button that activates a color changing part

  • @person8316
    @person8316 4 роки тому +18

    guys what he's trying to do towards the end does work but he just forgot wait(), anyways here's the script:
    local function onTouched()
    wait(1)
    script.Parent.Anchored = false
    wait(1)
    script.Parent.Anchored = true
    end
    script.Parent.Touched:Connect(onTouched)

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

      Your pfp got me

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

      @@joshualee6852 imagine not using dark mode

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

      The Blinking Brownie what in the f*** does that have to do with events?

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

      @@crystalscreens9057 It has nothing to do with events, Joshua said that Person's profile picture got him. Well his profile picture is a fly sitting on a default picture with a white background. To be fooled by that you also need a white background which means Joshua did not use dark mode.

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

      The Blinking Brownie and does it matter of we don't use dark mode? Sometimes people like the light more than the dark.

  • @A_Latte-CoffeCup
    @A_Latte-CoffeCup Рік тому

    Im already know these functons and just watch this series because Im bored and dont have motivation to do something, but Im really impressed how good you can explain something. Good job, dude👍

  • @loober-d3h
    @loober-d3h 2 місяці тому

    thanks to your tutorials i made a working door using Events, if statements and object-oriented programming, huge thanks to you bud : )

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

    2:24 was really helpful

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

    i love how he makes it fun by adding in Hotdog as a variable every time :))

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

    If you are gonna make a bunch of falling parts that have the same name use this because if you don't, only one of the parts are gonna fall, also instead of putting this into the workspace, put it into the part.
    local function EpicFall()
    script.Parent.Anchored = false
    end
    script.Parent.Touched:Connect(EpicFall)

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

    A great roblox dev teacher always sets hotdog as an example.

  • @3rDimensional
    @3rDimensional Рік тому

    its so perfect its like your friend explaining something to you

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

    YO DUDE THANK YOU SO MUCH
    I made it so if you don’t go up the staircase in time the part that your standing on will have CanCollide turned out off, so if you stand on a part too long (1 second) you will fall through but when you do the script will turn CanCollide on in 3 seconds so you can do it again without having it to be permanently disabled.
    Thank you so much, although it’s not much you have helped me accomplish something I have never done before as a beginner in scripting.
    +1 sub
    Thank you

  • @zewhenry2621
    @zewhenry2621 8 місяців тому

    I like that the tutorials give clear instructions. The videos help me a lot, thanks!

  • @NileMcKenna
    @NileMcKenna Рік тому +1

    Thank you for these, I really feeling like I'm getting somewhere quickly

  • @ЕмилНиколчев-л1н
    @ЕмилНиколчев-л1н 4 роки тому +3

    for your testing at the end you had to do it with while true do :)

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

    Bro you explain so well because of you I can code and script now thanks so much dude!

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

    For the last part, i think the wait time of 1 second was short and by the time a second passed, the part already touched the ground. i kept a wait time of 0.5 seconds and it worked for me.
    game.Workspace.Part.Anchored = true
    local function anchorremoval()
    game.Workspace.Part.Anchored = false
    wait(0.5)
    game.Workspace.Part.Anchored = true
    end
    local function start()
    game.Workspace.Part.Touched:Connect(function()
    anchorremoval()
    end)
    end
    start()

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

    If you have problems with the Part printing when touching the baseplate, you can also make it only run if the player touches it. (USES PARAMETERS)
    game.Workspace.Banana.Touched:Connect(function(Hit)
    if game.Players:GetPlayerFromCharacter(Hit) then
    print("Ahh!")
    print(Hit)
    end
    end)
    In line 1 When something touches the part, the touched event returns data to the parameter (Hit) the parameter will now equal to the data it sent eg. Left leg (Think of the parameter like a variable)
    In line 2 The script checks to see if the body part that touched the part is a player (It checks for a player in the character, an NPC can be a character but it can't be a player) if it is a player it will run line 3
    In line 3 it prints "don't touch me"
    end
    But to be honest Im not sure myself how line 2 works :')

  • @rishondsouza2312
    @rishondsouza2312 2 місяці тому +1

    in the second method of the touch event, how does one add parameters if they dont allow parenthesis

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

    3:27 if from this script your function doesnt work just delete spaces that putted automaticly

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

    Nice refresher for someone like me who forgets quite a bit

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

    Tysm! I’m learning to code and this was really usefull!

  • @Galactix-nx5qi
    @Galactix-nx5qi 3 роки тому

    Thanks to you I figured out how to script my game so then when you walk over The part it turns neon and Prints shine bright

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

    rlly good tuts i literally made a obby and made that one glass game from squid game where u have to guess which one is safe

  • @kokuno.
    @kokuno. Рік тому

    after i watched this, i decided to dig in more and managed to make it so when u touch the part it dissapears and when u dont touch it it reappears.

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

    I know this might be an old vid but you inspired me to start my own ROBLOX channel!

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

    btw why it didnt work at the end was because i dont know but it has to be like this part = game.Workspace.Part
    local function yo()
    part.Anchored = false
    wait(1)
    part.Anchored = true
    end
    part.Touched:Connect(yo)

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

    Everyone here i wish you good luck to learn scripting I’m already a great at scripting I can make cool games so will you it only takes a month to learn like me and I’m still learning I will finish in 2 more months well it’s kinda hard because I need to learn by my self because the tutorials are finished and others are basic so good luck to you all

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

    Thanks Dude, when you play around I learn alot.

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

    from this tutorial I made this cool script (also my first every script kinda)
    script.Parent.Touched:Connect(function()
    if script.Parent.Touched then
    script.Parent.Transparency = 0
    end
    end)

    script.Parent.TouchEnded:Connect(function()
    if script.Parent.TouchEnded then
    script.Parent.Transparency = 1
    end
    end)

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

    I’ve watched many many scripting tutorials of anything but mostly explaining events. Your video was the most useful and had the best and most straight-forward explanation, thank you!

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

    game.Workspace.Block.Touched:Connect(function()
    game.Workspace.Block.Anchored = false
    print("Text")

    end)
    Totally gonna work

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

    This series is so helpful 😭

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

    thank you dev king you did a really great job explaining but I have a question: so when we are doing and event for something we can connect like a raw function into it?

  • @The-World-info-9
    @The-World-info-9 2 роки тому

    to wait the function u need to move it below the end to work i belive

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

    Do you have any sort of script or part of a video explaining how to make an NPC wander? Like it moves to random directions for a short time, then stops for a few seconds, and then continues walking. Somewhat similar to the way NPCs in Dinosaur Simulator move around.

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

      yes watch my pathfinding tutorial

  • @susveycorpes
    @susveycorpes Рік тому +1

    Idk if anyone will see this but for some reason, my text already appears once in the output when it only appears after u touch the part in the tutorial

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

      See if u named the part not the floor because maybe u put all commands to execute on the floor

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

      @@cr4zy989 yo I tried it, it worked tysm!

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

    So far I have learnt so MUCH

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

    I don’t know how to make my own scripts I understand the material but don’t know how I will use this to make my own script for my gamw

  • @syclasmfn1850
    @syclasmfn1850 6 років тому +2

    OMG REALLY GUD PLEASE DO MORE

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

    bro i wrote the script oral it worked but without me touching it and i copied the whole script he wrote and it did the same thing

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

    at the nd you can put remove() so it rmeoves itself so it goesnt make loads of print statements

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

    i swear to god i cant remember the events thing
    i have come back to this video atleast 6 times

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

    finaly someone who can teach me how to code easily'
    great videos

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

    the last thing you tried did work, the wait aspect i mean. i think the problem was that you continued touching it so the function just kept running over and over again and setting anchored to false

  • @Wow-xi3xz
    @Wow-xi3xz 3 роки тому +1

    It keeps running the event after I hit play, even if I never initially touch the brick. How do I fix the issue?

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

      It doesn't matter whether a player touches it or a part touches it unless specified. is the part touching something else like the baseplate?

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

    even tho this is kinda old it helped me learn coding

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

    I am watching this while listening to It has to be this way

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

    guys, the 'touched' event gets fired as soon as i spawn in without even touching it, is there a reason why?
    edit: It was because it was touching the ground because it was already not anchored, but when i try to make it anchored, it stays anchored despite the function saying the anchor is false,
    what should u do?

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

    Events are soooo exciting lol!

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

    I know im super late but can someone help explain what the word "game" at the beginning of the line do?

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

      Game basically indicates the game that ur in. if you don't use it the script will break and not continue, hope this answer's your question

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

    *Can someone please please tell me whats wrong with this?: : (*
    local function PressingButton()
    game.Workspace.Baseplate.Anchored = "false"
    print("It is working tho?")
    end
    game.Workspace.Button.Touched:Connect(PressingButton)

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

      Sorry i don't understand how to script

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

      false shouldn't have " " so delete them. Also delete Button and replace it with Baseplate

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

    10:23 reason that functiıon doesnt work its because you touch it multiple times and it run again again and again so when it tries to set anchored to true another run makes it false

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

    how to remember all of this?

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

      Write stuff down on like google docs or on a paper or something like that

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

      practice it several times a day

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

      try think of ways you can use this in a game and program it

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

      Use brain

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

      @@cazulon1122 lol

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

    also after it does (''part name here'').Anchored = false how can u make it go back to its original place? im thinking of doing a remake of my obby whit harder stages and more obstacles and after finishing the obby im gonna try to do a zombie game (simple at start)

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

    How do i get the wiki?

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

    Guys I literally made a part where if you touch it another part becomes transparent and you can walk through it I’m so proud lol

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

    Hey, How to reset an event??
    For Example, I am building an obby and I used the script:
    local function ThePart()
    print ("Works!!")
    game.Workspace.BoyOhBoy.Anchored = false
    end
    game.Workspace.BoyOhBoy.Touched:Connect(OKBRO)
    And I wanted it to reset to the place where it was,
    You know what I mean right??
    Please answer :)

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

    Notes:
    If you go to view and find the object browser, you can see different events and other things you can use in code. Its better to use the wiki
    Parts have children that are events. Events have lightning symbols.
    After you type the event you type :connect(function()
    This will make a function that is called when the event happens
    Example:
    Part.Touched:Connect(function()
    Print (yes)
    end)
    And when you touch that part, then yes will be printed
    If an event is ran, you can use a wait code, but if it’s ran again, the event wont wait, and it will restart the function from start. Another way to do this is
    local function [insert the name of your function]()
    [code]
    end
    part.Touched:Connect([insert name of your function])

  • @JackFrost-xz4wc
    @JackFrost-xz4wc 3 роки тому

    thank you!!! All I had to learn about was some humaniod stuff and I could make a working kill brick for my obby!

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

      Even tho you can just go free models and copy the script of a random kill block!

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

    "Roblox has listeners in the game"
    Kids: OmG rObLoX iS wAtChInG uS!!!!

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

    I have a quick question. If I say, unanchored a part and it falls a bit. But after 2 seconds I want it to go back to the starting position. How do I make it go back up? An answer would be really great!

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

      you are going to use the Vector3.new property.
      local part = game.Workspace.Part
      part.Anchored = false
      wait(2)
      part.Anchored = true
      part.Position = Vector3.new(0,5,0)--this will set the part to a new position.
      hope it helps!

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

      @@zhyV thanks so much. That was really helpful

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

    Thanks Bro, I have just on doubt how should I prevent the function from running multiple times?
    I want to run it only once

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

    ok so for some reason my part instantly falls
    heres my code
    local function fall()
    print('Function Active')
    game.Workspace.FallObject.Anchored = false
    end
    game.Workspace.FallObject.Touched:Connect(fall)
    can anyone help me to make it fall only when its touched by a character?

  • @DisGorilla-yhkit
    @DisGorilla-yhkit 10 місяців тому

    when i start the game, the part automatically changes color after i put the script, (i put a color change instead of a print one) anyone know a fix?

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

    Is It Normal? If I Understand advanced coding Within 2-3weeks?

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

    4:42 "What the function" 👏👏👏👏👏👏👏👏

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

    I think i can confidently say that i will get nowhere trying to learn scripting and i am only wasting my time because i dont understand any of this so i guess ill just stick to playing games

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

    im litterally watching all previous video and this midnight lol

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

    You are amazing just saying

  • @RLGamerzOfficial
    @RLGamerzOfficial 8 місяців тому

    I Have a question and i am seeing the video 5 years later so DevKing Cant see my comment so please answer and my question is - Why Do We Have To Add Parentheses After Naming The Function?

    • @Lee94113
      @Lee94113 8 місяців тому +2

      It's mainly basic syntax but ask yourself this: if I ever want to set parameters for the function, how would my script know the difference between the function_name and the actual parameters themselves?
      Also, removing the parentheses will generally give you an error(because you haven't followed the syntax)
      Hope this helped.

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

    Congrats who reached this far

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

    I got a question. If I make the parts fall, how do I make them respawn?

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

    in the output every time I run it automatically says the thing 2:36 but ur doesnt, how?

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

    what about descendants and ancestry functions

  • @Subspace.T.Tripmine
    @Subspace.T.Tripmine 2 роки тому

    when I execute this code it says passed value is not a function
    Here is my code:
    game.Workspace.Baseplate.Touched:Connect(function()
    print("hej")
    end)

  • @What1-
    @What1- 11 місяців тому

    I wanted to make a part change colors when touched and this is the code i used, is there any easier way to do it?
    local function function4()
    game.Workspace.Part.BrickColor=BrickColor.new("Light yellow")
    end

    local function function5()
    game.Workspace.Part2.BrickColor=BrickColor.new("White")
    end

    local function function6()
    game.Workspace.Part3.BrickColor=BrickColor.new("Brick yellow")
    end
    local function function7()
    game.Workspace.Part4.BrickColor=BrickColor.new("Pastel Blue")
    end
    local function function8()
    game.Workspace.Part5.BrickColor=BrickColor.new("Light reddish violet")
    end
    local function function9()
    game.Workspace.Part6.BrickColor=BrickColor.new("Light reddish violet")
    end


    game.Workspace.Part.Touched:Connect(function4)
    game.Workspace.Part2.Touched:Connect(function5)
    game.Workspace.Part3.Touched:Connect(function6)
    game.Workspace.Part4.Touched:Connect(function7)
    game.Workspace.Part5.Touched:Connect(function8)
    game.Workspace.Part6.Touched:Connect(function9)

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

    game.Workspace.MyPart.Touched:Connect(function()
    print("I was stepped on grr")
    end)
    -----------------------------------------------------------------------------------------------------------------------------------------------
    My question is, why does it print the string in the output right away once I run the game and the part is unanchored, but it prints it when I touch it and it is anchored?
    ------------------------------------------------------------------------------------------------------------------------------------

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

      It's because another part is touching "MyPart", a baseplate could touch "MyPart" and still trigger the code

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

      @@TheMurcielago yeah and you should give him a way to make it work only for "players" if you can

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

      @@TheMurcielago I never thought that would be possible, thank you so much for the explanation!

  • @VicTenCrafty
    @VicTenCrafty Рік тому +72

    All other tutorials just dont feel the same and not motivating, but this guy's tutorials, they are just magic, I owe this man my entire developer career and motivation to be a developer.

    • @9kxre
      @9kxre Рік тому +5

      he teaches really good and makes jokes so its entertaining

    • @giraffelove12
      @giraffelove12 Рік тому +3

      @@9kxrelocal hotdog = yourComment
      local hotdog = facts

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

      @@giraffelove12
      If yourComment == facts then ()
      you received a like from me
      end

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

      @@squash9189 I feel like I didnt even word it right because
      if myComment == true then
      print(“its true”)
      else
      print (“no”)
      end
      and it printed “no”

    • @roblox_boi8913
      @roblox_boi8913 8 місяців тому

      @@squash9189 correction:
      local function GiveLike()
      yourComment.Likes = 1
      end
      if yourComment.Facts == true then
      GiveLike()
      end

  • @texasred5250
    @texasred5250 4 роки тому +41

    Whenever I learn from games, I payed for a game that teaches you to script I get headaches. Then I turn on your channel and suddenly it all makes sense...

    • @ACMaxtogo
      @ACMaxtogo 3 роки тому +21

      He's like the Indian guy teaching you math but for scripting! Lol.

    • @Moonclips_
      @Moonclips_ 3 місяці тому +4

      there is a new game called "scripting school", and it's free and very helpfull.
      yes I replied after four years

  • @gamingguns1555
    @gamingguns1555 5 років тому +52

    I love your channel I just found it today and I already know soo much more! Thank you 😊

  • @aiden654
    @aiden654 2 роки тому +16

    Thank you so much. At this episode I did a lot of scripting myself so much. I ended up making my own script where whenever you touch a block it turns red but whenever you get off it turns green bc its happy your not stepping or touching it anymore.

  • @lamedev1342
    @lamedev1342 5 років тому +21

    Are you going to be teaching more events?

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

      No

    • @Luke-db1ev
      @Luke-db1ev 3 роки тому +1

      @@joshuajurado939 thanks you were just a year and a half late

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

      @@Luke-db1ev 👨🏿👨🏿👱🏻‍♀️👨🏿👨🏿👨🏿‍🦳

  • @Unicornny
    @Unicornny 3 роки тому +8

    "hope you know what i mean"
    me : yes i hope too lol

  • @jaaztillo
    @jaaztillo 4 роки тому +22

    Me as a noob oh so now we getting interesting ight I see how it is XD
    Am barley getting started with scripting

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

      Same!

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

      But i also good modeler

  • @MrSplattt
    @MrSplattt Рік тому +11

    Dude your tutorials are actually helping me learn a lot. I learned how to make the platform fall after a couple of seconds because of your videos.

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

      bro its not that hard to make a platform get fall after a couple of seconds, even my lil bro can do it..
      But I understand you, DevKing series is really helpful!..

    • @qarful7
      @qarful7 Рік тому +1

      @@fuzailgaming715 21 December 2022 💀💀💀

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

      @@qarful7pardon, i dont understand

    • @SunnyValeAl
      @SunnyValeAl Рік тому +1

      @@fuzailgaming715 pants pants got those ants

  • @isaiah4tone
    @isaiah4tone 4 роки тому +11

    Another fantastic tutorial! I love how I not only learn something but also have a lot of fun learning it! :D

    • @flurest4334
      @flurest4334 2 роки тому +2

      Same!!

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

      im crying in shame while watching this video

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

    I thought I could never learn how to script because of these bad tutorials. I only knew the print script a bit but that was it. Today I learned many things. Thank you so much. If I would ever get famous I would tell my viewers to subscribe to you :)

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

      Bad tutorials from him????

  • @multi8108
    @multi8108 4 роки тому +6

    so basically after watching this video and all other videos before it i decided to test what i can do and i did it 2 different ways one i set up 8 bricks where when you touch them they turn red and if all 8 brick are red then a coin appears in the middle and the second way im about to try is using the touch ended event when when the touch is ended the the coin is invisible but when touched it isn't and there is only one brick this time but you have to push something ontop of the brick and then get the coin

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

      nice scripting

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

      you kinda gave me a idea to make a script where like if u collect the coin it goes transparent so heres what i came up with im pretty proud of it:
      local Coin = game.Workspace.Coin
      local function CoinAppear()
      Coin.Transparency = 0.2
      end
      local function CoinDisappear()
      Coin.Transparency = 1
      end
      game.Workspace.Coin.Touched:Connect(CoinAppear)
      game.Workspace.Coin.TouchEnded:Connect(CoinDisappear)
      -- end
      also im new to scripting so sorry if it isnt completely functional lol

  • @attackerstoasdfa
    @attackerstoasdfa 3 роки тому +6

    You managed to fit something that usually takes hours to teach into just 10 minutes, if you say you are not one of the best Roblox scripters ever, you're lying.

  • @Kata..12k.S
    @Kata..12k.S 4 роки тому +5

    i got mad because my script wasnt working until i noticed the function was not written wrtie lol this so helpful

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

      Yeah you didnt spell it wrtie because of that