Remote Functions (Two-Way Communication) - Roblox Advanced Scripting #6

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

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

  • @Likeable_Emmec
    @Likeable_Emmec Год назад +30

    Wow. Honestly impressed with how you explained things here! I'm a little rusty on the RemoteFunction since it doesn't have too much scenarios I use in my games, so having a tutorial as in-depth as this is really helpful. Keep up the great work!

    • @BrawlDevRBLX
      @BrawlDevRBLX  Год назад +31

      I'm glad to hear that! It seems like people find it less interesting for in-depth explanations and want to get straight to the answer of implementation. I've been debating about this, but I think what I'm doing is really helpful for a bunch of people who want to understand these concepts in greater detail and I don't have to give that up just to be more appealing to the general audience. I hope you continue to find my videos helpful, even if they are explained pretty long! 😅

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

      @@BrawlDevRBLX i personally don't think I would be able to understand this without the long explanation... If anything, the length just gives you more time to really get in-depth with the matter at hand, and since it's quite a complicated subject, the more material the better!!!
      P.S i'm really happy with the progress I've been making in scripting due to you!! cheers on 21k!!!!

  • @momomon7662
    @momomon7662 5 месяцев назад +27

    That challenge at the end was so hard, I spent well over an hour (I think almost two hours) writing it, testing it, fixing the bugs, testing it again, searching up errors that popped up in the output and then fixing it again, it was SO SO SO much fun, even though I did get frustrated just staring at the code trying to think of anything else that I could possibly do that could fix the code, but the satisfaction at the end after debugging everything myself and staring at the screen trying to think of anything I could do to change the code so that it works, I cannot explain how happy I am with myself after that challenge. I owe you so much.

    • @coolkid7377
      @coolkid7377 4 месяца назад +3

      thats the attitude you need to be a good coder

    • @Bijimix
      @Bijimix 3 месяца назад

      same bro

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

    ive never seen a more in-depth scripting guide than yours. I've watched the beginner scripting tutorial and planning to watch all of the advanced scripting. You are the best youtuber for learning how to code

  • @ABOT_OW
    @ABOT_OW Год назад +4

    Thank you for helping me understand this man! Underrated as hell.

  • @crammplays3532
    @crammplays3532 Год назад +2

    Bro this tutorial is perfect for someone like me 😅 The way you explain is perfect and you even include some complicated ones like the syntax. You're the best keep it up! I hope you get popular someday ❤

    • @BrawlDevRBLX
      @BrawlDevRBLX  Год назад +1

      That's great to hear my teaching style is helping you! Hope you stick around when I do get popular! :)

  • @aaaaaaaaaaaawda
    @aaaaaaaaaaaawda 29 дней назад

    dude im SOOOO happy with your tutorials man ur the goat, i was honestly shocked that i was able to do the challenge without watching the vid man thank you for making great content, much love!

  • @dont-know_00
    @dont-know_00 8 месяцев назад +44

    never been so confused in my life i think 😭😭

    • @Hexplaysroblox
      @Hexplaysroblox 5 месяцев назад +3

      same

    • @patpace
      @patpace 5 месяцев назад +2

      if yes, what about returns?

    • @owlzam612
      @owlzam612 5 месяцев назад +4

      @@patpace idek what return end does 😭

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

      @@owlzam612 return delivers and stores a value back to the function. Simple as it gets.

    • @Project_Ares01
      @Project_Ares01 5 месяцев назад +2

      @@owlzam612 It basically gives the value contained in the variable.
      in the video, the variable PurchaseSuccessful = true
      which means that the variable PurchaseSuccessful contains the boolean value - true
      when it's called to return, the variable contains the value which is true
      so when they checked if the PurchaseSuccessful == true
      then it's indeed - true

  • @pr0doxz410
    @pr0doxz410 Год назад +3

    You know it’s a good day when BrawlDev uploades!!

  • @Averist
    @Averist 3 месяца назад +2

    I have been learning developing for a year now. So i already have some knowledge on this. You make everything seem easier for me thank you. Ans and also guys developing is not something you learn in a week or a month it takes a lot of time. Even big developers dont know everything on developing. Just KEEP LEARNING AND PRACTICING. I hope you find this comment useful.❤

    • @Teil
      @Teil День назад

      I been learning for about a week now and Ive learned alot, like I think I could make some simple games now, but im going learn more before I start so I dont lack any knowledge that I can possibly use to make the games better

  • @oliwier1578
    @oliwier1578 26 дней назад

    loved the challenge i did it in around 20/30mins also its so nice to see that im able to script stuff without problem even tho i started learning around 2 weeks ago so thank you because this is the only tutorial that i can understand easily and fast

  • @ItzBlixYT
    @ItzBlixYT 2 месяца назад +1

    Thanks so much for a series like this BrawlDev! The challenges are a fun part to do

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

    You seriously need some more attention. Like, the way you teach (like the intro explanation) is very easy to understand.
    The challenges you also do are very helpful as to remember the other things and such. When I'm done with this series i can give you more feedback. Anyways, thanks for making good tutorials.

  • @kosmosaurus
    @kosmosaurus 4 месяца назад

    I've been reading some scripting books and when I got to the Remote Functions chapter, I never understood it. Now I can make a whole shop without looking at anything for help! The challenge was really fun, not too hard, and I didn't even have any bugs! Thanks so much (again)!

  • @TackJum
    @TackJum Год назад +3

    Honestly I wish you could just get picked up by the algorithm already cause these are actually useful

    • @BrawlDevRBLX
      @BrawlDevRBLX  Год назад +3

      Gotta play the long game for my channel! I'm gonna hope one day a random video explodes and then the new viewers sees my backlog of content lol. Thank you for sticking around and hope you continue to while I'm still small :)

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

    A precious tutorial. Keep going I'm loving it. I'm understanding way more than I ever expected to :D

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

    This tutorial was much more helpful and direct than any other videos I've seen without being confusing. This deserves more views

  • @lolaswift111
    @lolaswift111 9 месяцев назад +3

    With realworld examples. Simply awesome. many many thanks!

  • @akazathebestteacher
    @akazathebestteacher 3 дня назад

    That challenge was so fun and helpful to implement in future games! Thanks

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

    That was a really fun challenge. (probably because I succeeded)
    Although I didn't approach it the same way that you did because I lack experience on using variables, parameters, and tables (I also created individual remote events for each call too). I ended up repeating myself many times and it felt tedious and boring. but in the end, I succeeded, and I was happy for myself. The excitement from succeeding on the challenge didn't last long as I watched you code the same thing but taking 1/5 of the time it took me to make while not even using tables😅. But then I remember that I shouldn't be comparing myself to someone who has a lot more experience and knowledge, instead, take the comparison as a lesson to learn about my lack of knowledge and skills, therefore allowing me to grow even more. Your tutorials actually teach us how to program not just what to program.
    Anyway again, thank you for all the tutorials, it's awesome!

  • @Naz-tj2hv
    @Naz-tj2hv Месяц назад +1

    The challenge was good and I was able to do it in around 25 mins, but I wanted to try and challenge myself further and made two different for loops and made a table in both the local and server script, and this made it so I didnt have to write all 3 different things for each button in the server and local script. very good challenge thanks for the video :D

    • @twinz4364
      @twinz4364 Месяц назад

      quick question you say you were able to do this challenge in 25 mins? May I ask if you watch these videos back to back in succession or devote particular periods of time to master the contents of a singular video on these topics?

    • @Naz-tj2hv
      @Naz-tj2hv Месяц назад

      @twinz4364 I watched the vid once, went back to see the syntax of how to create a remotefunction because I got stuck, and then was able to finish the program. I watch each video very closely and if i think I got it i move on to the next vid in the playlist but if I do need relearn a topic i just keep replaying that section Im stuck on until I understand it

  • @TheAndrey1
    @TheAndrey1 4 месяца назад

    Hey! It took me 3 days to understand remote functions and remote events at least, it was pretty hard to get everything you need about these topics, and it took me over 1.5 hours to make the last challenge shop system!, Thank you very much for making these videos, i learned a lot!!!

    • @YupLeditz
      @YupLeditz 4 месяца назад

      can u plz explain

    • @liko_was_here
      @liko_was_here 3 месяца назад

      @@YupLeditz practice makes perfect

    • @ItsFootball-CR7
      @ItsFootball-CR7 2 месяца назад +1

      This is very big, but it is very simple

  • @Boomboomboy-j6x
    @Boomboomboy-j6x 3 месяца назад

    Thanks man, I was wanting to make a Roblox game and I thought I was a downer at scripting because I couldn’t find anyone who did a beginners tutorial so thanks man 👍🏼

  • @baconheadhair6938
    @baconheadhair6938 6 месяцев назад

    0:51 ive just used remote events to do that, you can just fire server then fire the client in the fire server functions and it works the same

  • @Proxypp
    @Proxypp 7 месяцев назад +1

    you are the best at explaining!

  • @realsuperjuice
    @realsuperjuice Год назад

    you are so good at explaining!

  • @CodeByteCrafter
    @CodeByteCrafter 6 месяцев назад

    at first i was rlly confused with both events and functions, After watching for 2-3 times and practising different things i can confirm that remote events and functions are not hard or easy and rlly useful. once again tysm for these turtorials!!!❤

  • @Azalee3
    @Azalee3 11 месяцев назад +1

    Hi i have a question at 24:19 i tried to make a for loop buy im a starter so i dont know where to put the arguments exemple of what i made
    Local button = {
    Button1,
    Button2,
    Button3
    }
    For _, k in paires(button) do
    k.MouseButtonclick1:connect(function(
    Local purchasesuccesseful = remotefunction.InvokeServer(and how i put the argement for each button ?)
    End)
    End
    And i want to know what to i put the argement of each buttons like "sword" for item and price argument i need the awnser cuz im doing the same in my game and need these 2 argument PLS HELPPPP

    • @jagdishramesh6636
      @jagdishramesh6636 10 месяцев назад +1

      Honestly dude just put your question through chatgpt

    • @jagdishramesh6636
      @jagdishramesh6636 10 месяцев назад

      O nvm im late lol

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

      Local b = { -- b short for button
      ["B1"] = (button location),
      ["B2"] = (button location),
      ["B3"] = (button location)
      }
      For _, k in pairs(button) do
      k.MouseButtonclick1:connect(function(b ["B1",], b ["B2"], ["B3], (put in prices here IN ORDER)
      Local purchasesuccesseful = remotefunction:InvokeServer(b
      End
      End
      (tell me if it works but im just theorizing)
      for leader stats:
      remote.OnServerInvoke = function(plr, b1, b2, b3, (prices))

    • @coolkid7377
      @coolkid7377 7 месяцев назад

      @@agoobaka oh you used dictionaries. I tried using arrays and then use an in pair loops. Everything looked good so far until it was referencing the mouseclick. it didn't work for me :(

    • @agoobaka
      @agoobaka 7 месяцев назад

      @@coolkid7377 srry im also new just tried helping

  • @Vent-rn6ze
    @Vent-rn6ze 4 месяца назад

    hi im watching this as a beginner trying to learn how to script for freelancing,
    i love your videos keep doing them PLEASE their extremely helpful and have a touch that no other tutorials have.
    i think i would 1000% watch you script with you just talking about anything really, as those videos although seem boring would really be entertaining imo

  • @squdavr
    @squdavr 4 часа назад

    Wow, I didn’t think that I would do it with such precision as you.

  • @secondzephyr
    @secondzephyr 6 месяцев назад +1

    thank you SO much for making coding videos. I think that these are honestly the only ones that work for me

  • @FireBloxPlaysRBLX
    @FireBloxPlaysRBLX 24 дня назад

    From the Client to the server to the script to the stats🔥

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

    Awesome video especially the last part of shopping for tools.

  • @Proxypp
    @Proxypp 7 месяцев назад

    why do you only have 5k subscribers, you deserve more ):

  • @onlyAJ2
    @onlyAJ2 11 месяцев назад

    your videos helped me alot with scripting!

  • @F1R3CPU
    @F1R3CPU 10 месяцев назад

    About the challenge what I did is put the tools in replicated storage and I didn't any arguments on InvokeServer (I scripted each function separately) and the Clone() I did it on the local script inside the shop GUI and it worked. I don't know if I did correct or it is better the method shown in the video

  • @Rad1ation
    @Rad1ation 11 дней назад

    15:53 What if you need Information from the host? (The User) Thats basically the only reason I could see that happen

  • @Real_Feeki
    @Real_Feeki 2 месяца назад +1

    Time for the challenge starting at 19:55 let´s see how much time till i finish this

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

      If i were to copy all the other scripts it would be a huge commentary so hell nah

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

    challenge at the end had my script looking so messy, unfortunately had to look at the video to follow through with it, just a few errors on my script which totally messed it up, but I'm taking it as a learning moment! scripting involves so much trial and error i have to get used to it

  • @Light-u3h
    @Light-u3h Месяц назад

    Lowkey spend an hour doin this but i did some extra things to the shop such as showing the entire shop when i press the shop button and making it close when pressed again soo probably worth it i guess

  • @ZyanFernando
    @ZyanFernando Год назад +9

    Bro not only explains but also gives us challenges for real time uses and has only 2k subs while cringe tiktokers are in millions. Damn..

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

    You're like a hidden gem in the world of teaching.

  • @prixxyGMD
    @prixxyGMD 18 дней назад

    This is so usefull bro! Thank you!!

  • @queijoqualhofanaf
    @queijoqualhofanaf 3 месяца назад

    For the challenge, you can simply make the entire mousebuttonclick section a function and write local player = game.Players.LocalPlayer soo it knows which player's backpack the tool should be put

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

    15:12 can someone help me it says leaderstat os not a valid member of played

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

    Bro Im learning a lot w man

  • @crystawl
    @crystawl 21 день назад

    while doing the challenge I thought I had finished it, but after watching your version I noticed my script would only show the tool for those who had the tool, I fixed it based on yours, so I guess I lost my first challenge 😭

  • @MultiplyMaster
    @MultiplyMaster 4 месяца назад

    Really good tutorial :D
    btw how did you make the icons in explorer look like that?

  • @ghosthunterroblox2549
    @ghosthunterroblox2549 4 месяца назад

    I am going to do this challenge later because im making a game with everything im learning with you i think at the result of the game it is going to be great

  • @ThatGuyNamedBender
    @ThatGuyNamedBender Месяц назад

    Pre-video comment before I watch as I am curious if it will make what I did easier lol
    So I handled security for these interations between server and client using events and a profilestore
    Within the profile store I have a key for each player going security -> actionHash
    In my server script I handle an interaction event with a proximity prompt that then creates a sha256 encrypted key based on several factors which I can't reveal but then that hash gets stored to the player's security.actionHash data then I fire a client event to handle gui and animations but I send that hash to the client, then when that gui/animation finishes it fires back to the server with action hash then the server deems whether or not it matches with whats on the player's data store and if it does then it erases that old action hash from the data store and considers the message from the client to be a valid action completion.
    Now I'm gonna watch this to see if it remote functions are better than my convoluted action encryption

  • @ANTIPHXBIA-Off
    @ANTIPHXBIA-Off 7 месяцев назад +1

    thats actually a kinda complicated one for me. idk why tho cuz i am good at remote events but not at remote functions

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

    wouldnt a good use case for server-client-server functions be to calculate stuff, like isnt it better to give the work to 20 different clients instead of doing the work for 20 clients?

  • @Kyo-d
    @Kyo-d 6 месяцев назад +1

    Tried to do it with for i,v and it worked ty!
    local Rs = game.ReplicatedStorage
    local Buy = Rs.Buy
    local Gui = script.Parent
    local Light = Gui.Light
    local Med = Gui.Med
    local Heavy = Gui.Heavy
    local table = {Light, Med, Heavy}
    for i,v in pairs(table) do
    v.MouseButton1Click:Connect(function()
    if v == Light then
    local Light = Buy:InvokeServer(Light, 25)
    if Light then
    print("yay")
    else print("Nope")
    end



    elseif v == Med then
    local Med = Buy:InvokeServer(Med, 50)
    if Med then
    print("yay")
    else print("nope")
    end


    elseif v == Heavy then
    local Heavy = Buy:InvokeServer(Heavy, 120)
    if Heavy then
    print("yay")
    else print("nah")
    end
    end
    end)
    end

  • @Teil
    @Teil День назад

    "Allright, lets think about this for a minute!" 🤓☝

  • @2kmadzz185
    @2kmadzz185 Год назад

    amazing video, you should make one about Module Script

  • @Dominodadoggy
    @Dominodadoggy 4 месяца назад

    YOU ARE THE BEST ROBLOX SCRIPTING TEACHER ALIVE!!! YOU START FROM THE VERY BASICS AND YOUR REALLY MAKING MY DREAMS COME TRUE!!! IM WORKING ON A GAME WITH OTHER PPL CALLED SLASH BATTLES. if i ever do become a good scripter, i will never forget the help you gave me

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

    I implemented the new leaderstats scripts into the leaderstats script I've been using for all your videos and nothing happened when I clicked "Purchase button". I didn't get an error or anything. I disabled my leaderstats script and copied the necessary lines for my remote function button into a new leaderstats script and it worked. Could you or someone explain why this happened and how my other remote event script could have effected it?

  • @10ficile2retrouver
    @10ficile2retrouver Месяц назад

    Why Did u not directly Connect the mousebutton event to the remote function in ur local script?

  • @Apple_Tie
    @Apple_Tie 3 месяца назад

    I'm always able to do most of the challenges, but not in the most effective way as does anyone experience the same thing?

  • @Grrzk
    @Grrzk Месяц назад

    From since i reached remote events things just get confusing

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

    The only thing I have hard for in these codes is how to begin and how to think. What do I need to write to make this work and how can I do this for the best result.

  • @brokeneyealert3984
    @brokeneyealert3984 7 месяцев назад

    tnx a lot and I learned a lot form your videos series

  • @xavchoc
    @xavchoc 19 часов назад

    is it bad if we rewatch the videos to help us for the challenge?

  • @ChampionsDontWearShirts-hv6cr
    @ChampionsDontWearShirts-hv6cr 7 месяцев назад +1

    it took me 3 days to understand this. im so slow lol

  • @bobthebuilder-do1rt
    @bobthebuilder-do1rt 2 месяца назад

    I finished the begginer scripting tutorial today.

  • @JohnPaul-v2f
    @JohnPaul-v2f 4 месяца назад

    you really know its gonna be a hard one when it is 30+ mins

  • @ghosthunterroblox2549
    @ghosthunterroblox2549 4 месяца назад

    Can you explain me how to make a event that if the player keeps standing in a part then something happens idk, because i seached and didnt found i just founded touchended. Pls do a video on this or just explain it pls

  • @WhoLetsBludCook
    @WhoLetsBludCook Месяц назад

    Great tutorial !!

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

    What do I need to to if it says that "I'm not authorized to access asset"

  • @likeememecompilation6879
    @likeememecompilation6879 10 месяцев назад +2

    When I become successful I’m coming back to pay you I promise ❤

    • @BrawlDevRBLX
      @BrawlDevRBLX  10 месяцев назад +3

      I will be waiting when you become a top tier dev! :)

  • @Sirius-p4m
    @Sirius-p4m Месяц назад

    i dont know how to make something that give me tool but i made gates that you buy it its open

  • @kura.x
    @kura.x 7 месяцев назад

    tysm but where did you get the buy sound at the beginning plsss

  • @Enemy-U
    @Enemy-U 8 дней назад

    From the client To the Server To The Sword, WHERES MY CHEZZBURGER I REALLY NEEDED AT🔥🔥🔥🔥

  • @Safashifin
    @Safashifin 9 месяцев назад

    W demonstrations ty

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

    i feel my brain imploding

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

    - - 20:42

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

    this man underrated fr

  • @jlboss_ps4751
    @jlboss_ps4751 4 месяца назад

    I DID THE CHALLENGE FINALLY!!

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

    I managed to do the challenge I did re use a little code though. Is that allowed?

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

      Whatever works for you bro!

  • @AniCut1174
    @AniCut1174 3 месяца назад

    can you do it with scripts and models?

  • @UsTube.
    @UsTube. 6 месяцев назад

    I failed to do the challenge it’s to hard😅

  • @JohnPaul-v2f
    @JohnPaul-v2f 3 месяца назад

    i think im slowly gettin it

  • @الخلبوصة
    @الخلبوصة 7 месяцев назад

    I WAS ABLE TO DO THE CHALLENGE

  • @TyKo-h8w
    @TyKo-h8w 4 месяца назад

    We need a PROGRAM TOOL!

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

    it doesnt work for me every time i do it, with every tutorial it never works 🙏

    • @YupLeditz
      @YupLeditz 4 месяца назад

      well its yo fault

  • @GimboFlop
    @GimboFlop Год назад

    How do you make it so you can only buy one weapon

    • @Azalee3
      @Azalee3 11 месяцев назад

      What do u mean ? If u said how to just have no price just take them of

    • @GimboFlop
      @GimboFlop 11 месяцев назад

      @@Azalee3 you can buy more then one of a specific item

    • @valerix7613
      @valerix7613 10 месяцев назад

      @@GimboFlop I'm a new scripter here so apologies if I made a mistake. I think you can use "debounce" (basically just a variable but I saw many ppl use that name) and set the value of it equal to false. Then add an if statement inside of the function connected to the MouseButton1Click event. This is how I do it:
      local remote = game.ReplicatedStorage.RemoteFunction
      local debounce1 = false
      script.Parent.Pizza.MouseButton1Down:Connect(function()
      if not debounce1 then
      debounce1 = true
      local success = remote:InvokeServer("pizza")

      if success == "Pizza Purchased" then
      script.Parent.Pizza.BackgroundColor3 = Color3.new(0.137255, 1, 0.207843)
      script.Parent.Pizza.Text = "Purchase Succeed!"
      else
      script.Parent.Pizza.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
      script.Parent.Pizza.Text = "Purchase Failed!"
      end
      end
      end)
      Btw the code is different from the video in some places but for me it works. Let me know how it works and hope this could help!

    • @Lucas-xn5bn
      @Lucas-xn5bn 8 месяцев назад +1

      @@GimboFlop You can just set a if condition that checks if a tool already exists in the backpack and then once it does, disable the buy button and put like "Bought" or "Failed" in the text.

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

      @@Lucas-xn5bn oh I fixed a while ago but thanks

  • @Appolo-dw7hi
    @Appolo-dw7hi 7 месяцев назад

    Thanks i learnt now

  • @StolenTextures
    @StolenTextures 6 месяцев назад

    I love watching videos like this and seeing the view count go down with each one as people are all giving up

  • @muhammadfaizan5856
    @muhammadfaizan5856 4 месяца назад

    hmm my brain died

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

    Brawldev I'm going to get murdered by this challenge. I boutta die
    Edit: Brawldev I did it in 2 hours. Your shop looks like doodoo compared to mine (even tho you did it like 10 minutes ;-;).
    Anyways I had headaches until the morning but I still did it. I made the shop a toggle-able popup when you pressed a "Shop" button in the left corner. Also I used a table with prices n stuff cuz I still didn't fully understand tables. Now I understand tables too. I didn't make a prompt and instead just made the button itself say the purchase was successfull.

  • @ArdaPOLAT-n3x
    @ArdaPOLAT-n3x 6 дней назад +1

    only 898 likes 💀💀

    • @xavchoc
      @xavchoc 20 часов назад

      so

    • @ArdaPOLAT-n3x
      @ArdaPOLAT-n3x 11 часов назад

      @@xavchoc this tutorials are underrated maam

    • @xavchoc
      @xavchoc 11 часов назад

      @@ArdaPOLAT-n3x frr

  • @GrindGamerX
    @GrindGamerX Год назад

    Nice

  • @JohnPaul-v2f
    @JohnPaul-v2f 3 месяца назад

    amazing

  • @mohamedemad7519
    @mohamedemad7519 4 месяца назад

    I dont recommend ppl to use remote functions its so bad to usr

  • @Starboy-qc9fg
    @Starboy-qc9fg 7 дней назад

    i have a better chance to learn smt from high school...and im 11😭😭💀😭💀

  • @wilsonybiernasiii7287
    @wilsonybiernasiii7287 3 месяца назад

    Sakit na ulo ko

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

    this is how i looped through them
    local Tablee = {
    SpeedBuyButton,
    JumpBuyButton,
    SpeedJumpBuyButton
    }
    for i , v in pairs(Tablee) do
    v.MouseButton1Click:Connect(function()
    local Purchasesucs = remoteFunction:InvokeServer(game.ReplicatedStorage.Speed,v.Value.Value)
    if Purchasesucs then
    local oldtext = v.Text

    v.Text = "Purchase SUCCESSFUL!"
    v.BackgroundColor3 = Color3.new(0,255,0)
    task.wait(1)
    v.Text = oldtext
    v.BackgroundColor3 = Color3.new(0.333333, 0, 0.498039)
    else
    local oldtext = v.Text
    v.Text = "Purchase FAILED!"
    v.BackgroundColor3 = Color3.new(255,0,0)
    task.wait(1)
    v.Text = oldtext
    v.BackgroundColor3 = Color3.new(0.333333, 0, 0.498039)
    end
    end)
    end

  • @milkmilkmilkmilkmilkmilk
    @milkmilkmilkmilkmilkmilk 6 месяцев назад +1

    local screengui = script.Parent
    local scrollingframe = screengui.ScrollingFrame
    local function buyItem(itemName, itemPrice)
    local success = game.ReplicatedStorage.RemoteFunction:InvokeServer(itemPrice, itemName)
    if success then
    print("purchase successful for", itemName)
    else
    print("purchase failed for", itemName)
    end
    end
    local buySword = scrollingframe.BuySword
    local buyKnife = scrollingframe.BuyKnife
    local buyGun = scrollingframe.BuyGun
    buySword.MouseButton1Down:Connect(function()
    buyItem("Sword", 5)
    end)
    buyKnife.MouseButton1Down:Connect(function()
    buyItem("Knife", 10)
    end)
    buyGun.MouseButton1Down:Connect(function()
    buyItem("Gun", 15)
    end)

  • @amara7734
    @amara7734 7 месяцев назад

    For some reason I decided to spend a good 4 hours on the gui for the challenge lol, anyway here was my code
    local gui = script.Parent
    local shopButton = gui.ShopButton
    local Players = game:GetService("Players")
    local player = Players.LocalPlayer
    local swordTool = game.ReplicatedStorage:WaitForChild("SwordTool")
    local gunTool = game.ReplicatedStorage:WaitForChild("GunTool")
    local bowTool = game.ReplicatedStorage:WaitForChild("BowTool")
    local shieldTool = game.ReplicatedStorage:WaitForChild("ShieldTool")
    local shopFrame = game.StarterGui:WaitForChild("ShopFrame")
    shopButton.MouseButton1Click:Connect(function()
    shopButton.Active = false
    shopButton.Visible = false

    local shopGUI = shopFrame:Clone()
    shopGUI.Parent = gui
    local prompt = shopGUI.Prompt

    local buyButtonSword = shopGUI.BuyButtonSword
    buyButtonSword.MouseButton1Click:Connect(function()
    local purchaseSuccessful = game.ReplicatedStorage.BuyButtonSword:InvokeServer()
    if purchaseSuccessful == true then
    swordTool.Parent = player.Backpack
    prompt.Text = "PURCHASE SUCCESSFUL!"
    prompt.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
    else
    prompt.Text = "PURCHASE FAILED!"
    prompt.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
    end
    end)

    local buyButtonGun = shopGUI.BuyButtonGun
    buyButtonGun.MouseButton1Click:Connect(function()
    local purchaseSuccessful = game.ReplicatedStorage.BuyButtonGun:InvokeServer()
    if purchaseSuccessful == true then
    gunTool.Parent = player.Backpack
    prompt.Text = "PURCHASE SUCCESSFUL!"
    prompt.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
    else
    prompt.Text = "PURCHASE FAILED!"
    prompt.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
    end
    end)

    local buyButtonBow = shopGUI.BuyButtonBow
    buyButtonBow.MouseButton1Click:Connect(function()
    local purchaseSuccessful = game.ReplicatedStorage.BuyButtonBow:InvokeServer()
    if purchaseSuccessful == true then
    bowTool.Parent = player.Backpack
    prompt.Text = "PURCHASE SUCCESSFUL!"
    prompt.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
    else
    prompt.Text = "PURCHASE FAILED!"
    prompt.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
    end
    end)

    local buyButtonShield = shopGUI.BuyButtonShield
    buyButtonShield.MouseButton1Click:Connect(function()
    local purchaseSuccessful = game.ReplicatedStorage.BuyButtonShield:InvokeServer()
    if purchaseSuccessful == true then
    shieldTool.Parent = player.Backpack
    prompt.Text = "PURCHASE SUCCESSFUL!"
    prompt.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
    else
    prompt.Text = "PURCHASE FAILED!"
    prompt.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
    end
    end)

    local shopExitButton = shopGUI:WaitForChild("ShopExitButton")
    shopExitButton.MouseButton1Click:Connect(function()
    game:GetService("Debris"):AddItem(shopGUI, 0)
    shopButton.Active = true
    shopButton.Visible = true
    end)
    end)
    It still looks really mundane but i see a lesson on gui in the future so we get there when we get there. I was even thinking of creating the shop as a new instance everytime but the idea sounded worse the more i thought about it. You're an excellent teacher and i hope your channel blows up.

    • @Light-u3h
      @Light-u3h Месяц назад

      i heard you dont need to use waitforchild when trying to find something in replicated storage idk

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

    I did a version where it works with the replicated storage but I look the one u did. Great video
    local buybuttonremote = game.ReplicatedStorage.RemoteFunction
    local Gui = script.Parent
    local Prompt = Gui.TextLabel
    local Frame = Gui.Frame
    local BuyPillow = Frame.Pillow
    local BuySword = Frame.Sword
    local BuyGun = Frame.Gun
    local players = game:GetService("Players")
    BuyPillow.TextButton.MouseButton1Click:Connect(function()
    local purchaseSuccessful = buybuttonremote:InvokeServer()

    if purchaseSuccessful then
    local plr = players.LocalPlayer
    local Pillow = game.ReplicatedStorage.Pillow:Clone()
    Pillow.Parent = plr.Backpack
    else
    Prompt.visible = true
    task.wait(3)
    Prompt.Visible = false
    task.wait()
    end
    end)
    BuySword.TextButton.MouseButton1Click:Connect(function()
    local purchaseSuccessful = buybuttonremote:InvokeServer()
    if purchaseSuccessful then
    local plr = players.LocalPlayer
    local Sword = game.ReplicatedStorage.Sword:Clone()
    Sword.Parent = plr.Backpack
    else
    Prompt.visible = true
    task.wait(3)
    Prompt.Visible = false
    task.wait()
    end
    end)
    BuyGun.TextButton.MouseButton1Click:Connect(function()
    local purchaseSuccessful = buybuttonremote:InvokeServer()
    if purchaseSuccessful then
    local plr = players.LocalPlayer
    local Gun = game.ReplicatedStorage.Gun:Clone()
    Gun.Parent = plr.Backpack
    else
    Prompt.Visible = true
    task.wait(3)
    Prompt.Visible = false
    task.wait()
    end
    end)

  • @Teil
    @Teil День назад

    "Allright, lets think about this for a minute!" 🤓☝