How to create a Shop - Tower Defense Tutorial #21

After much confusion and delay, I've returned to finish off the series. In this episode I walk you through the whole process of building a shop GUI and how to script it. In the next episode, we'll look at how to use Datastores to save player data between playthroughs.
DISCORD ► / discord
TWITCH ► / gnomecode
TWITTER ► / gnomecoderblx
TIMESTAMPS ►
0:00 Intro
1:12 Creating GUI
16:32 Showing off new towers
17:30 TowerShop module
20:18 Creating LocalScript
22:45 Creating prompt
24:02 Toggle gui on/off
26:32 Displaying items in shop
38:13 Setting item status
43:26 Ordering by price
44:12 Interacting with items
58:56 Outro

Пікірлер: 610

  • @tofuaxolotl5478
    @tofuaxolotl54782 жыл бұрын

    Probably the most dedicated dev I have ever seen, keep up the amazing work.

  • @quackywhackityphillyb.3005
    @quackywhackityphillyb.30052 жыл бұрын

    When the world needed him most, he returned

  • @nv_ae

    @nv_ae

    2 жыл бұрын

    why is this comment everywhere

  • @fredygarcia8796

    @fredygarcia8796

    2 жыл бұрын

    Yes

  • @quackywhackityphillyb.3005

    @quackywhackityphillyb.3005

    2 жыл бұрын

    @@nv_ae When the youtube comment section needs it most, it apears.

  • @minipumking

    @minipumking

    2 жыл бұрын

    Absolutely

  • @Clash_Studio1

    @Clash_Studio1

    2 жыл бұрын

    Tower/player data does not exist, what me do?

  • @Ollie0nline
    @Ollie0nline2 жыл бұрын

    Hey GnomeCode! Great video and tutorial in itself! This ones been a long time coming, try not to take too many suggestions and overwhelm yourself! Go with what your comfortable with, have an awesome one gnome, remember to take breaks!

  • @GamerGamerYT918

    @GamerGamerYT918

    2 жыл бұрын

    That right!

  • @antonvustudentmhs5098
    @antonvustudentmhs50982 жыл бұрын

    YOOOO TYSM. I've been waiting for this episode of your series!

  • @minipumking
    @minipumking2 жыл бұрын

    Yes a new episode! I have been waiting for this for a very long time.

  • @That_OneGuy46
    @That_OneGuy462 жыл бұрын

    Oh thank goodness, I thought the series finished at episode 20 and the was still so much I wanted to learn. Thank goodness!

  • @Ernad1

    @Ernad1

    2 жыл бұрын

    im pretty sure theres only like one more episode after 22..

  • @muffinmcdeez54321

    @muffinmcdeez54321

    2 күн бұрын

    @@Ernad122’s the last one

  • @Ernad1

    @Ernad1

    2 күн бұрын

    @@muffinmcdeez54321 that comment is an entire year old, before the series was completed

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

    This is amazing bro! I just hope that the next episode we got an way of getting the lobby currency and data stores and the shop working for the game!

  • @bighorizon3373
    @bighorizon33732 жыл бұрын

    I am so happy you have returned gnomecode, you have made my day 😀

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

    This man has taught me a lot in this series amazing, best dev on KZread!

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

    this is helping me more than expected with my td game, good work gnome!

  • @Alexmow
    @Alexmow2 жыл бұрын

    As someone who’s never scripted before, I’ve got to say this series so far has taught me so much. Your explanations are very simple, thanks to you I mostly know what functions and tables are! I know some people are only here for the scripts, but you’ve genuinely made me learn so much. I’m not even kidding, I probably know more about Roblox Lua because of you than I know algebra from my math classes.

  • @trisidektos2404

    @trisidektos2404

    2 жыл бұрын

    exactly bro, he's a legend we didn't deserve, but still got

  • @Clash_Studio1

    @Clash_Studio1

    2 жыл бұрын

    Tower/player data does not exist, what me do?

  • @vimic0

    @vimic0

    Жыл бұрын

    I make my tower defense game by myself and watch these tutorials if i dont know how to add something

  • @FrostedOven

    @FrostedOven

    Жыл бұрын

    I don't learn shit in my math classes

  • @M4x_M3m3z

    @M4x_M3m3z

    Жыл бұрын

    @@FrostedOven Lol same

  • @cocostars_37
    @cocostars_372 жыл бұрын

    I've seen a lot of dev all over youtube... And your are definitly the BEST one i've ever seen. Your videos are easy to understand and just amazing. Thank you for everything you do :)

  • @user-pb8cv9fc3n
    @user-pb8cv9fc3n2 жыл бұрын

    OMG I WAITED FOR THIS VIDEO SO MUCH!

  • @kennethkline7702
    @kennethkline77022 жыл бұрын

    Yay. The series is back!!!!!!!

  • @aqieefimt
    @aqieefimt2 жыл бұрын

    this man deserved a star code

  • @newraptor8696
    @newraptor86962 жыл бұрын

    Hey GnomeCode, I’m new on you KZread channel and I love your work. I just want to say thanks for your explanations.

  • @GnomeCode

    @GnomeCode

    2 жыл бұрын

    Thank you, that's great to hear

  • @doinic09

    @doinic09

    2 жыл бұрын

    @@GnomeCode Gnomecode, there is a problem with the targeting system. For the first targeting it hits enemies in alphabetical order instead of first to last.

  • @hamsterking_346

    @hamsterking_346

    6 ай бұрын

    @@doinic09 same

  • @IBRLCS
    @IBRLCS2 жыл бұрын

    Holy crap you are good at scripting no matter what you do good job 👍

  • @trashedx6691
    @trashedx66912 жыл бұрын

    It's been a while but you're back now 😊

  • @ShermanMark1
    @ShermanMark12 жыл бұрын

    Yay I was hoping for more Videos for this series

  • @Root.Av_iation
    @Root.Av_iation2 жыл бұрын

    Yay, new episode!

  • @cubic_
    @cubic_2 жыл бұрын

    I was starting to loose motivation on making the tower defense game,until i saw this. YESSSSSSSSS

  • @zedsdev1202
    @zedsdev12022 жыл бұрын

    i thought the series is finished;-; now we have to wait for it AGAIN

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

    Thanks for your tutorials! It is really cool and needed)

  • @flowrsh
    @flowrsh2 жыл бұрын

    Welcome back

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

    With school out its time to crack down on my tds work. Thanks gnome

  • @letsparty01645
    @letsparty016452 жыл бұрын

    NO WAY NEW EPISODE OMG OMG OMG OMG 2MONTHS FOR THIS SO WORTH IT!!!!!!!!!!!!!!

  • @GodlyPerson.
    @GodlyPerson.2 жыл бұрын

    THE COMEBACK

  • @0bit096
    @0bit0962 жыл бұрын

    Love you gnomecode! Keep it up :D

  • @creatorrea
    @creatorrea2 жыл бұрын

    YEEEEEES! NEW TUTORIAL!

  • @aletvksa7739
    @aletvksa77392 жыл бұрын

    today is my birthday :D am so happy you gnome posted video on my birthday

  • @jump_shadow3343
    @jump_shadow33432 жыл бұрын

    Many people thank you for these tutorials

  • @bobkerman8930
    @bobkerman89302 жыл бұрын

    I KNEW YOU GONNA MAKE THIS TYSM

  • @artrobloxname983
    @artrobloxname9832 жыл бұрын

    and also, ur tutorial about tds is so useful, my tds getting better :D

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

    Return of the king

  • @booz1080
    @booz10802 жыл бұрын

    YESSS I LOVE YOU GNOME CODE

  • @noahindev
    @noahindev11 ай бұрын

    hi i just have a question i made a model made a couple of stuff and made upgare skins and when i go in game to test it the slot just does not pop up can u help?

  • @cinnamonisthecat
    @cinnamonisthecat2 жыл бұрын

    Gnomecode is back! Everyone celebrate!

  • @NHQ-pg3pq
    @NHQ-pg3pq Жыл бұрын

    When I click the image buttons, it always warn that player or tower doesn't exist, what should I do?

  • @Rip_Partner
    @Rip_Partner2 ай бұрын

    Gnome at 23:46 time i didnt have the interact shop button can you show how to fix it?

  • @DarkIie-fn9nr
    @DarkIie-fn9nr10 ай бұрын

    Hello I used this tutorial and for some players the shop isnt showing up. Any idea why?

  • @Feashis
    @Feashis2 жыл бұрын

    He has returned!

  • @NeonNebulaSunrise
    @NeonNebulaSunrise2 жыл бұрын

    YOOO HIIII I LOVE YOUR EPISODES!

  • @RX.PROD.
    @RX.PROD.2 жыл бұрын

    can you separate the store where only to buy heroes and the inventory where to dress them I want to do so in my Pls

  • @memeseara8141
    @memeseara81412 жыл бұрын

    Hey, on the 3rd tutorial, the animations aren't working and i wanted to ask if i could have some help

  • @jsnotlout3312
    @jsnotlout33122 жыл бұрын

    You make great tutorials. I watch them even though I don't need too lol

  • @PrimatePlaysGaming
    @PrimatePlaysGaming7 ай бұрын

    how do i make the shop like when i buy a tower that i will have it in the game when im playing?

  • @SuperGamer-kr1dn
    @SuperGamer-kr1dn6 ай бұрын

    I followed everything in this tutorial and I was so excited to upload this game but there is an error which I cannot fix. I tried my best but I can’t. So when I play the game and get teleported then my towers that I have selected are not loading in the game. Please help 😢

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

    How do I make a banner summons system that switches randomly every hour?

  • @Boltplayer3123
    @Boltplayer31238 ай бұрын

    Can someone help me, for some reason, only some of my towers have pictures, but i added the pictures in for every tower.

  • @yungbasco
    @yungbasco2 жыл бұрын

    YEESSS IVE NEEDED THIS

  • @Clash_Studio1
    @Clash_Studio12 жыл бұрын

    Cool GnomeCode, you returned. YAEY

  • @robloxmasterplayz2983
    @robloxmasterplayz29832 жыл бұрын

    Is there a possible way you make a video to make custom admins commands for the tower defense game.

  • @andrei_63
    @andrei_6310 ай бұрын

    Hi! I did everything exactly the same, but my problem is that when the 3rd wave starts, the game stops working, that is, the zombies stop going

  • @Chaser2001
    @Chaser20012 жыл бұрын

    the king returnsssss

  • @WearWQLF
    @WearWQLF2 жыл бұрын

    Man I see you working on Trap shop in teddy I don't know how long this was here on the studio but if it is still on work I am all for .

  • @clickingz
    @clickingz2 жыл бұрын

    Am still on episode 12 but thank you so much for doing this videos

  • @alrighty222
    @alrighty2228 ай бұрын

    Ok the glitch im having a problem with is that for me my towers show up, and sometimes it does for other people. But a lot of the time it just shows the money and tower limit in the shop, and no towers are displayed. Can someone help me?

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

    I was scripting and almost done but then i lost conection to it and nothing in the shop worked anymore and it made me so stressed like can someone help me out??

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

    hi another error, when i try to place a tower it says attempt to call a nil value

  • @MicroVolnushko
    @MicroVolnushkoАй бұрын

    this is very cool, but why does the script that we created in the last part simply not exist in this one? I'm talking about PlayerAdded, which should be in the ServerScriptService

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

    Gnome for some reason everytime I do this it keep get warn Tower/Player Data don't exist and no other error in the output hope you replied and help me

  • @nickmilano2516
    @nickmilano25162 жыл бұрын

    Question do you have a release date for Teddy chapter 5

  • @skittle74
    @skittle746 ай бұрын

    ah yes gnomecode the man who connects everything in existance into a function also good job gnomecode this is the best damn tutorial i've seen :O

  • @ThatBeenuxGuy

    @ThatBeenuxGuy

    4 ай бұрын

    LocalfunctionAlexrosecomment()

  • @skittle74

    @skittle74

    Күн бұрын

    @@ThatBeenuxGuy true

  • @Fireboy49_YT
    @Fireboy49_YT2 жыл бұрын

    Finally, After 2 month it finally Return

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

    somehow it comes orange line under playerdata when i use it in updateItems

  • @BasedOnBrian
    @BasedOnBrian2 жыл бұрын

    Yes we need this

  • @Mr_Doge..
    @Mr_Doge.. Жыл бұрын

    Guys i made a Shop icon but everytime i want to load the shop i get the gui but the towers wont load can anyone help?

  • @norigrimm3170
    @norigrimm31702 жыл бұрын

    What about a infinite mode or different type enemies like airs speed power people and how about a item shop that changes and percentages to get them?

  • @Fun_stickman
    @Fun_stickman2 жыл бұрын

    57:28 for some reason it says (for me) that tower does not exist every time, but I checked the code and it was just as yours. Any ideas why its not working? Please help! Edit: Nevermind, I fixed it already. I mispelled the names of towers hehe...

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

    im a scripter, and i dont use youtube that much for scripting, but this tutorial is amazing! in the main game, you can add towers without having to script ANYTHING, because the scripts are prepared for any amount of towers! i think this tutorial is AMAZING for beginners, and i will recommend this to my friends who want to make tower defense games!

  • @therock6878

    @therock6878

    8 ай бұрын

    Hey if your a Scripter can u explain to me how to make a tower seasonal becuase I can’t figure it out

  • @Aetherbeen

    @Aetherbeen

    7 ай бұрын

    @@therock6878 You cant figure it out because you dont have to figure it out, thats how easy it is

  • @GoatedTsbPlayer

    @GoatedTsbPlayer

    16 күн бұрын

    Except the fact it be like 100 years outdated

  • @winkytoot

    @winkytoot

    15 күн бұрын

    @@GoatedTsbPlayer this comment was FROM A YEAR AGO I fixed the problem already, and then the person I was making this game for (who keep in mind wasn't even paying me I was doing this for free) deleted the game, called it trash and blocked me

  • @despwned_PL
    @despwned_PL2 жыл бұрын

    Finally he's back!!!!

  • @CloudsDragon1
    @CloudsDragon12 жыл бұрын

    This Is Absolutely Amazing I Cant Wait For Episode #22 This Will Be Amazing For My Game

  • @aceplayzgames3608

    @aceplayzgames3608

    2 жыл бұрын

    He privated episode 22 for some reason

  • @JuniDevs

    @JuniDevs

    2 жыл бұрын

    @@aceplayzgames3608 He said he didn't like it, I never got to finish it but hopefully when he remakes it, it'll be good.

  • @WearWQLF
    @WearWQLF2 жыл бұрын

    Thanks for the Series Just a question when is the next GameNight

  • @d00mprod
    @d00mprod3 ай бұрын

    My elevators arent working, they keep teleporting to the wrong one and the same one every time, and every time you rejoin its randomized again

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

    How do you make multiple shops in one lobby

  • @HalalBoyHabib
    @HalalBoyHabib2 жыл бұрын

    I did what u did but nothing seems to be working I’m still stuck in part 1

  • @drifting5308
    @drifting53082 жыл бұрын

    What screen recorder do you do use? It's amazing.

  • @swordlegend3256
    @swordlegend32562 жыл бұрын

    Even tho I know how most of the script works I still learn something thanks

  • @dheng6813
    @dheng6813Ай бұрын

    Lets goo #21 completed

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

    how do you code the rocker?

  • @Uwi_Legend
    @Uwi_Legend5 ай бұрын

    why is my scrolling frame i broken? i can,t scroll and its too big

  • @jmvoo2244
    @jmvoo22446 ай бұрын

    Congrats on 100k subs

  • @GnomeCode

    @GnomeCode

    6 ай бұрын

    Thanks!

  • @crystlwolf4743

    @crystlwolf4743

    6 ай бұрын

    ​@@GnomeCodecan you make an updated series for the new code?

  • @blackcomethazardic
    @blackcomethazardic8 ай бұрын

    My image doesn't load, what should I do? 34:58

  • @finn8975
    @finn8975Ай бұрын

    i cant update my shop server and idk i mean i cant change the default tower or anything

  • @thebuttersareexotic7679
    @thebuttersareexotic76792 жыл бұрын

    someone help im stuck on episode 3 cuz my walk animation wont load

  • @d00mprod
    @d00mprod3 ай бұрын

    How do you make towers event only

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

    can you show us how can we do random shop with rare,gold and mytich chance pls

  • @tinpotproductions7454
    @tinpotproductions74542 жыл бұрын

    after the next vid, may you please do a torturial on how to make a mode selector? Like a easy mode, normal mode, hard mode and stuff like that, and then maybe PVP as the finishing one?

  • @GreenDragonGaming
    @GreenDragonGaming2 жыл бұрын

    Is any one getting a issue that if you try to equip a tower it buys it twice and takes away your money? Edit: I didn't have the player in the 'getItemStatus' function on the server.

  • @VoidSpirals
    @VoidSpirals2 жыл бұрын

    Hey gnomecode, if people were to customize the game ourselves, how would we make our own models and stuff for the game? I’d use your character rigging tutorial because it works well for me, but I only used that for enemies. What about towers and custom attacks for them?

  • @NotPuzzledAtAll

    @NotPuzzledAtAll

    Жыл бұрын

    he made a vid on that

  • @gucciclown4955
    @gucciclown49552 жыл бұрын

    Great tutorial! When your finished, could you make a series on how to make a game like outlaster on roblox? Theres basically no tutorials on that front

  • @m5niI
    @m5niI2 жыл бұрын

    he finally came back

  • @Jashaz-fz8vr
    @Jashaz-fz8vr2 жыл бұрын

    Thanks gnome

  • @itsray5257
    @itsray52572 жыл бұрын

    Hello gnomecode, i suggest you to make a series about how to make a RTS game, it would be really cool!

  • @artrobloxname983
    @artrobloxname9832 жыл бұрын

    hey, can u rec video about data saving and creating modes that gives badge

  • @ditar2fxre248
    @ditar2fxre24811 ай бұрын

    Gnomecode instead of a shop I want to make a summoning units feature like a bunch of those anime tds can you make a video?

  • @guillelopez3737
    @guillelopez37372 жыл бұрын

    I love u channel bro, thank for all help

  • @THEBADEVO
    @THEBADEVO5 ай бұрын

    Can you do random unit system by use ing point

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

    how to i make normal shop only money? + idle towers wiev

  • @Stalkerbug7765
    @Stalkerbug77652 жыл бұрын

    yooooo hes backkkkkkk