SCORING GOALS - Events - Learn To Script #7

Learn how to use events to 'listen' for things happening in our game that we can then respond to using functions.
FILES ►gnome.codes/LearnToScript/
DISCORD ► / discord
TWITTER ►@gnomecodeRBLX
MUSIC
Aerosol Of My Love by Kevin MacLeod
Link: filmmusic.io/song/7013-aeroso...
License: filmmusic.io/standard-license

Пікірлер: 161

  • @3k4chu
    @3k4chu3 жыл бұрын

    The Gnome Has Gone Mad Crazy and I Like It

  • @dogwarlordyt

    @dogwarlordyt

    Жыл бұрын

    Ayo?

  • @Adnanio97
    @Adnanio97 Жыл бұрын

    What an underrated guy .. Your tutorials are really understandable 👍♥️

  • @josuecabralmatos2267
    @josuecabralmatos2267 Жыл бұрын

    This is very understandable and everything! I love how you make it fun, and we are making a game and learning at the same time! I love this tutorial course, and I hope you make an advanced one!!

  • @ifwedonothing9294
    @ifwedonothing92943 жыл бұрын

    Always happy to see a new GnomeCode video!

  • @Yeilding_HD
    @Yeilding_HD3 жыл бұрын

    This KZread channel make you learn to how to script easy.

  • @GnomeCode

    @GnomeCode

    3 жыл бұрын

    You heard it here first

  • @BendBlox
    @BendBlox3 жыл бұрын

    Cool video, I also have a idea for a video. it would be cool if you made a tutorial about how to give different animations to a custom starter character, such as an idle, jump, fall or swim because since I already used the first tutorial its the only tutorial that I trust using lol

  • @heon9519
    @heon95197 ай бұрын

    a cool way to learn using tutorials is pausing sometimes and trying to figure out how to do something without the guidence of a tutorial, it took me some time but I managed to make the goal scoreing work and then I tought I could also probably make the ball return to the original position, so I did that, now I am confident I won't forget it

  • @brightenlahaie533
    @brightenlahaie5333 жыл бұрын

    *yes,* the *coder* is *back* !

  • @flares7574
    @flares75743 жыл бұрын

    I guess it's time for me to learn Lua with these epik tutorials

  • @Someone-gr8qc
    @Someone-gr8qc3 жыл бұрын

    These vids re so great. Im so stupid but when I watch ur vids, Im really beginnig to learn how to script.

  • @veranelson5492
    @veranelson54923 жыл бұрын

    Best channel Ever

  • @BrktiCevap657
    @BrktiCevap65710 ай бұрын

    This guy is a LEGEND

  • @mohamed54yf
    @mohamed54yf3 жыл бұрын

    اتعلمت منك اشياء كثيره وجميله وبخطط لانشاء لعبه + شكرا لك

  • @kittles2713
    @kittles27133 жыл бұрын

    Hi GnomeCode Love your tutorials!! You are way better then AlvinBlox

  • @commonsquidtail
    @commonsquidtail3 жыл бұрын

    WE NEED THE NEXT EPISODE KEEP UP THE GREAT WORK

  • @Estoryu
    @Estoryu3 жыл бұрын

    Yay thanks gnome

  • @ahmet_9080
    @ahmet_90802 жыл бұрын

    best.video.ever.

  • @user-lq5mw8tk8w
    @user-lq5mw8tk8w Жыл бұрын

    hello! I am an avid Korean subscriber. I have a question. If I exchange that ball with something else, can I move it by kicking it?

  • @DazXat
    @DazXat Жыл бұрын

    hey Gnome can you bring up a tutorial about when a person score a goal it's say (playername) scores!

  • @edgebug
    @edgebug2 жыл бұрын

    At 13:08. Can someone tell me what is the more efficient way he is talking about?

  • @Imsoboredthatyes
    @Imsoboredthatyes Жыл бұрын

    First game thx so much! i've learned and starting making more games... Thiss really helped out.... You are the best! Thx :) Learn people more. Also make a gui show when u score a goal im confused how it works... So help pls?

  • @killr292
    @killr2923 жыл бұрын

    I still don't see a 4th dimensional first person shooter. Is it coming on video number eight?

  • @TheSpicyFilms
    @TheSpicyFilms3 жыл бұрын

    POV: *Your Reading This In Your Mind*

  • @tautvydaan

    @tautvydaan

    3 жыл бұрын

    Yea

  • @agamingchannel2

    @agamingchannel2

    3 жыл бұрын

    no i read it out loud ha

  • @iamincognitomode

    @iamincognitomode

    3 жыл бұрын

    m a g i c

  • @FlowNeverHigh

    @FlowNeverHigh

    3 жыл бұрын

    yes

  • @CJ-lj4gd
    @CJ-lj4gd3 жыл бұрын

    Hi gnome i was just want to know if you could mame a video of how to make a idle animation for a custom character, just like you did whit the walk animation, it would help me.

  • @zuzingo.
    @zuzingo.3 жыл бұрын

    How would you stop the velocity of the ball when it returns to the center of the game, because every time I score it would keep the velocity and roll somewhere else.

  • @GingFreecss824

    @GingFreecss824

    Жыл бұрын

    Many ways but here is a basic way, Ill assume your ball is in the middle of the field & not in the air. Make 4 basic parts & put them around the ball & scale them so the ball is trapped within parts. Select all 4 parts union them, rename the union to BallStopper or whatever u wanna call it. Take a look at my script to solve this issue. Rename any variable & parts so it works. local goal1 = workspace.GoalPost1.GoalDetect1 local goal2 = workspace.GoalPost2.GoalDetect2 local ball = workspace["Pitch Stuff"].Ball local stop = workspace["Pitch Stuff"].BallStopper -- A part used to stop the ball from moving when it relocates local ballPosition = workspace["Pitch Stuff"].Ball.Position -- the current position before its moved etc ------- stop.Transparency = 1 -------Functions/Events goal1.Touched:Connect(function(part) -- part detects what touches the goal1 part if part == ball then -- if ball touches the part it detects it then runs the code print("The ball has entered goal1") task.wait(2.5) ball.Position = ballPosition stop.CanCollide = true -- turns on collide & the stop parts stop the ball from rolling away task.wait(1) stop.CanCollide = false -- turns off collide removing the stop parts end end) goal2.Touched:Connect(function(part) if part == ball then print("The ball has entered goal2") task.wait(2.5) ball.Position = ballPosition stop.CanCollide = true task.wait(1) stop.CanCollide = false end end)

  • @zuzingo.

    @zuzingo.

    Жыл бұрын

    @@GingFreecss824 thanks for the help, i'll try it out

  • @alexanderwalschaers6852
    @alexanderwalschaers68522 жыл бұрын

    Cool YT trick type: awesome to make the timebar flickering in rb colors

  • @VIPTA_ALKEMISTS
    @VIPTA_ALKEMISTS8 ай бұрын

    i love this mans accent

  • @nlaboratorio105robloxstudi4
    @nlaboratorio105robloxstudi43 жыл бұрын

    Amazing! Always the best! But where’s the videos of the mafia city episodes?

  • @senanisgodly

    @senanisgodly

    3 жыл бұрын

    Yeah, these videos are really good it I prefer Mafia City Episodes.

  • @nlaboratorio105robloxstudi4

    @nlaboratorio105robloxstudi4

    3 жыл бұрын

    @@senanisgodly me too I want it to finish, but gnome has his choices !

  • @Zyxifymarc_
    @Zyxifymarc_11 ай бұрын

    gane you do a tutorial for goal effects PLEASE im making a basketball game and i really want to add goal effects

  • @flesxzy
    @flesxzy Жыл бұрын

    wait why is my transparent green thing not working as if its archivable. i see it when im editing the game but when i play it it just isnt there and i tried switching archivable and putting it back but the goals just wont show. whats happening?

  • @lem3579
    @lem35793 жыл бұрын

    Yo do you know how to make a teleport system like the one in The Mimic?

  • @khadijadakhli1870
    @khadijadakhli18703 жыл бұрын

    Gnome code I found an office with you in chapter three I got sleepy tho you were playing cards

  • @kingost1274
    @kingost12742 жыл бұрын

    FINALLY YOU USED DARK THEME..

  • @Estoryu
    @Estoryu3 жыл бұрын

    Ima make this this soccer thing and learn from it

  • @leticiamagnossaobezerra4080
    @leticiamagnossaobezerra40803 жыл бұрын

    But talking really i REALLY WANT you to do i'll love it!!!!!! :))))))))

  • @EmersonLeeM.
    @EmersonLeeM.3 жыл бұрын

    hey gnomecode will you be hosting a easter gnome jam?

  • @ElectroNuke
    @ElectroNuke Жыл бұрын

    so i have an problem,when i shot the ball at the goal idk why but it isn't placing the ball at the Ball Position... Someone can help?

  • @mysteryboss9410
    @mysteryboss94103 жыл бұрын

    Can you play fan made games on live stream? (My game is called Yacht (story))

  • @amgloriouschubbunny3261
    @amgloriouschubbunny32613 жыл бұрын

    Hey GnomeCode! You probably won’t do this but I think it would be really cool if you could continue the Teddy series and show us how to make a death screen, lobby etc. I know you finished the game, but I spent a while making the Teddy character and AI path finding and I really, really don’t want to let my work go to waste. Thanks!

  • @stoneop2615
    @stoneop2615 Жыл бұрын

    THANKS! Before, i didn't know how to make an event that when a part,, like the ball, touches something, ONLY THE BALL, it activates. Thank You.

  • @GnomeCode

    @GnomeCode

    Жыл бұрын

    I'm glad to hear you found it helpful. Thanks for watching

  • @mcall5554
    @mcall55543 жыл бұрын

    a gun tutorial would be nice as there are not alot of efficient ones.

  • @backstagegamer798
    @backstagegamer7982 жыл бұрын

    The dot is not pulling up any menu for me... is this tutorial obsolete now?

  • @loligurl1971
    @loligurl19713 жыл бұрын

    Hey Gnome_code can you do a tutorial on how to animate multiple motor 6D parts on a part? Because it seems I can't even animate the rig if there is so many motor 6D parts on one part, can you make a video to explain how to fix this?

  • @loligurl1971

    @loligurl1971

    2 жыл бұрын

    @@paopaothemaocow it did i learned the problem i just forgot to comment it :P

  • @Estoryu
    @Estoryu3 жыл бұрын

    You make scripting look easy lol

  • @RacletteLynx
    @RacletteLynx2 жыл бұрын

    What do i do if it spams the amount i touched the ball in "attempt to call a nil value" ("(x138)" times for example)?

  • @zenkai5481

    @zenkai5481

    2 жыл бұрын

    that's what happens to me :(

  • @oxhidoupsil
    @oxhidoupsil3 жыл бұрын

    Teach how to put animations on a morph (idle walk etc)

  • @ishaanrawal
    @ishaanrawal3 жыл бұрын

    Hey gnome, what is the bad meme blood between you and alvin blox. During the teddy dev logs, you call him out

  • @GnomeCode

    @GnomeCode

    3 жыл бұрын

    There's no depth to it, was just a quick joke seen as he's the biggest roblox scripting channel.

  • @ltsJustJay
    @ltsJustJay3 жыл бұрын

    I feel like someone is going to use these tutorials to make a roblox Fifa game

  • @Licazl
    @Licazl Жыл бұрын

    can someone help me, whenever the ball goes in the goal it scores like 4 goals instead of 1.

  • @botitized
    @botitized3 жыл бұрын

    nice

  • @daniszwarc
    @daniszwarc Жыл бұрын

    Hello GnomeCode and thank you for this great tutorial. I am hitting an issue I can't understand why this is happening? I do see my print out when either team scores and the ball goes back to the center for the first couple of goals, but it stops working right after: doesn't print out the goal nor returns the ball to the center of the field. Can't understand what could be happening. These are events so they should happen when they are triggered, meaning the ball touching the goal1 and goal2. Anyone else with this issue?

  • @intitem

    @intitem

    Жыл бұрын

    Yes I have the issue to. Idk how to fix it.

  • @GingFreecss824

    @GingFreecss824

    Жыл бұрын

    @@intitem I tried to get the issue by scoring multiple goals in the same goal but I had no problem. If you can send me your script & ill help you, or just look at your script for any errors.

  • @WhiteHatGuides

    @WhiteHatGuides

    Жыл бұрын

    Make sure the ball is in workspace. not in a folder. but in workspace

  • @WhiteHatGuides

    @WhiteHatGuides

    Жыл бұрын

    @@intitem put it in workspace. the ball.

  • @intitem

    @intitem

    Жыл бұрын

    @@WhiteHatGuides a long time but I fixed it alr thanks though

  • @ChristopherThePiss
    @ChristopherThePiss3 жыл бұрын

    Papa the daycare sank underwater

  • @poop-yk4kg
    @poop-yk4kg3 жыл бұрын

    Gnomecode is making a soccer game?

  • @hm3245
    @hm3245 Жыл бұрын

    It didnt print out GOAL for me for some reason

  • @c1nss
    @c1nss2 жыл бұрын

    How to make goal count gui??? Please i need very much

  • @DWD_Duck
    @DWD_Duck5 ай бұрын

    ball = script.Parent ball.Touched:Connect(function(part) print(part) end) Put the script inside of the ball

  • @Hyakkimaru0000
    @Hyakkimaru00003 жыл бұрын

    Hey GnomeCode How i Made Dialog And Give the item

  • @masonreid1153
    @masonreid1153 Жыл бұрын

    When did you do functions? I don't remember it

  • @GnomeCode

    @GnomeCode

    Жыл бұрын

    Check the playlist! There's an episode 5 (and 5.5 that I made later on which covers more detail)

  • @rosx_8446
    @rosx_8446 Жыл бұрын

    how do we find out who scored?

  • @icywolf6892
    @icywolf6892 Жыл бұрын

    3:52 wowwwww

  • @Smurfis
    @Smurfis Жыл бұрын

    Could you please redo this script with a matchmaking system and ranked?

  • @thedude955
    @thedude9553 жыл бұрын

    Hello! i have a new idea for a series try to make a game like Notoriety it would be pretty cool.

  • @thestarwarsvault4434
    @thestarwarsvault44343 жыл бұрын

    Is there going to be a easter Gnome Jam if there is I AM LOOKING FOWARD TO IT X 200000000

  • @waltuh5434

    @waltuh5434

    3 жыл бұрын

    in his stream he said he might do a different theme

  • @ElderWizard
    @ElderWizard3 жыл бұрын

    Dear gnome code please read this I got an idea for Teddy this is my idea when you collect an item there’s a 40 second timer you must use the item before the timer runs out if the timer runs out if you have the item the item goes back to its original spawn point I want this feature in the game because of the annoying trollers they grab items but they don’t use it on purpose and they ruined the whole game please add this it would make the game more fun!

  • @GnomeCode

    @GnomeCode

    3 жыл бұрын

    Hi bendy, I'm aware this is becoming an issue. Thanks for the suggestion

  • @ElderWizard

    @ElderWizard

    3 жыл бұрын

    @@GnomeCode yeah

  • @amgloriouschubbunny3261

    @amgloriouschubbunny3261

    3 жыл бұрын

    @@GnomeCode I spent a while making the Teddy character and don’t want my work to go to waste can you please continue the series?

  • @Aratazor
    @Aratazor8 ай бұрын

    "The Ball Has Been Touched"

  • @NoName-du7qo
    @NoName-du7qo3 жыл бұрын

    I made a game called ball thingie that I made with your tutorials it's made by lofified

  • @super_trainfanroblox887
    @super_trainfanroblox8873 жыл бұрын

    When are you going to work on I mafia city

  • @Delaunelewis
    @Delaunelewis2 жыл бұрын

    when i press . and scroll down theres no touched event

  • @Smurfis
    @Smurfis Жыл бұрын

    I’m definitely going to make a smaller version of this to play against my girlfriend with a goalie 1v1

  • @LukasKK670
    @LukasKK670 Жыл бұрын

    " The ball was touched " the fact that he didnt even noticed it.

  • @SmokinConedHat

    @SmokinConedHat

    7 ай бұрын

    it was touched by a part

  • @Shadowbirth1
    @Shadowbirth13 жыл бұрын

    Yesh

  • @ahmet_9080
    @ahmet_90802 жыл бұрын

    the end doesnt spawn on me

  • @IaIaman
    @IaIaman3 жыл бұрын

    Idea:How To Make A Billiard/Pool Game

  • @poopoostinkypants3427
    @poopoostinkypants34273 жыл бұрын

    Idea for a video: how much money/robux you made from all your published games?

  • @TonyTonyChoppy
    @TonyTonyChoppy3 жыл бұрын

    i have a video idea: I made a roblox game only using plugins, no scripts

  • @leticiamagnossaobezerra4080
    @leticiamagnossaobezerra40803 жыл бұрын

    If u pass my challenge, Do 2 things: Put the name Gnome sports mix 2. Make game night about it

  • @grahamgaming1254
    @grahamgaming12543 жыл бұрын

    video idea make a tower battle game

  • @Thyvogaming1
    @Thyvogaming1 Жыл бұрын

    My ball kept flying in the air lol

  • @DWD_Duck
    @DWD_Duck5 ай бұрын

    Does anyone have a new script for these videos? they are broken and out of date

  • @TheReddestBlue
    @TheReddestBlue3 жыл бұрын

    EA Sports Watching This: Write that down, write that down

  • @betagamp
    @betagamp2 жыл бұрын

    damn you've been using global variables for some time

  • @pedror1439
    @pedror14393 жыл бұрын

    do gnome jam

  • @doge1295
    @doge12953 жыл бұрын

    Can you plz help script on my game gnome?

  • @its_weird0
    @its_weird03 жыл бұрын

    When the ball is amogus 😳😳

  • @Estoryu

    @Estoryu

    3 жыл бұрын

    😳😳😳sus

  • @sournois90

    @sournois90

    3 жыл бұрын

    ball is the impostor??w?w?? 😳😳😳😳😳😳😳😳😳😳

  • @Aleksaafty
    @Aleksaafty Жыл бұрын

    Iam srry but can you add part 1 I can’t find it

  • @GnomeCode

    @GnomeCode

    Жыл бұрын

    Every this is in the playlist Learn to Script "Your First Game": kzread.info/head/PLtMUa6NlF10dfhmgI23R9EPmrBrWe7Pcs

  • @lilleader7239
    @lilleader72399 ай бұрын

    my ball just dissapeared

  • @rageguy5529
    @rageguy552911 ай бұрын

    bread

  • @breaderzz
    @breaderzz3 жыл бұрын

    make a chase script using recasting

  • @PreHawkGaming
    @PreHawkGaming9 ай бұрын

    i dont get it

  • @GingerNut
    @GingerNut10 ай бұрын

    World cupppppp

  • @calvinshiaalvarez6514
    @calvinshiaalvarez65143 жыл бұрын

    Scripting and gnomeo

  • @UrBlackShadowz
    @UrBlackShadowz2 жыл бұрын

    7:10

  • @Ricky69466
    @Ricky694663 жыл бұрын

    nice and first :D

  • @botitized

    @botitized

    3 жыл бұрын

    nope, sorry man you weren't, I wasn't either.

  • @brightenlahaie533

    @brightenlahaie533

    3 жыл бұрын

    alot of you arent

  • @wefflx961
    @wefflx9613 жыл бұрын

    can you make a tutorial on making a combat system with combos and stuff?

  • @Shadowbirth1

    @Shadowbirth1

    3 жыл бұрын

    Uhm he’s teaches scripting so you can do it on your own

  • @RobloxDoors143
    @RobloxDoors1439 ай бұрын

    Why dose my scripts always go wrong while watching these videos?

  • @mrcricket275
    @mrcricket2753 жыл бұрын

    Wwwwwwwwww im in online rn shh

  • @CavaleiroDev
    @CavaleiroDev3 жыл бұрын

    Name for the game: GnomeBall

  • @fishthingidk
    @fishthingidk3 жыл бұрын

    Day 6 of asking to continue you mafia city roblox remake

  • @zerik5220
    @zerik52203 жыл бұрын

    21st

  • @runes1216
    @runes12163 жыл бұрын

    First maybe I Dont know 🤷 my internet is kinda trash.

  • @MarioMario-yb3iz

    @MarioMario-yb3iz

    3 жыл бұрын

    gg

  • @runes1216

    @runes1216

    3 жыл бұрын

    @@MarioMario-yb3iz gg