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!
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! 😅
@@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!!!!
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.
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
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 ❤
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!
@@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
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.❤
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
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
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.
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)!
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 :)
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!
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
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?
@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
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!!!
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 👍🏼
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!!!❤
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
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))
@@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 :(
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
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
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
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
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
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 😭
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
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
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?
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
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
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?
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.
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
@@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!
@@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.
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.
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
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)
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.
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)
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!
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! 😅
@@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!!!!
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.
thats the attitude you need to be a good coder
same bro
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
Thank you for helping me understand this man! Underrated as hell.
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 ❤
That's great to hear my teaching style is helping you! Hope you stick around when I do get popular! :)
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!
never been so confused in my life i think 😭😭
same
if yes, what about returns?
@@patpace idek what return end does 😭
@@owlzam612 return delivers and stores a value back to the function. Simple as it gets.
@@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
You know it’s a good day when BrawlDev uploades!!
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.❤
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
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
Thanks so much for a series like this BrawlDev! The challenges are a fun part to do
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.
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)!
Honestly I wish you could just get picked up by the algorithm already cause these are actually useful
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 :)
A precious tutorial. Keep going I'm loving it. I'm understanding way more than I ever expected to :D
This tutorial was much more helpful and direct than any other videos I've seen without being confusing. This deserves more views
With realworld examples. Simply awesome. many many thanks!
🙏 😊 thanks
That challenge was so fun and helpful to implement in future games! Thanks
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!
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
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?
@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
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!!!
can u plz explain
@@YupLeditz practice makes perfect
This is very big, but it is very simple
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 👍🏼
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
you are the best at explaining!
you are so good at explaining!
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!!!❤
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
Honestly dude just put your question through chatgpt
O nvm im late lol
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))
@@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 :(
@@coolkid7377 srry im also new just tried helping
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
Wow, I didn’t think that I would do it with such precision as you.
thank you SO much for making coding videos. I think that these are honestly the only ones that work for me
From the Client to the server to the script to the stats🔥
Awesome video especially the last part of shopping for tools.
why do you only have 5k subscribers, you deserve more ):
your videos helped me alot with scripting!
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
15:53 What if you need Information from the host? (The User) Thats basically the only reason I could see that happen
Time for the challenge starting at 19:55 let´s see how much time till i finish this
If i were to copy all the other scripts it would be a huge commentary so hell nah
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
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
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..
Facts
You're like a hidden gem in the world of teaching.
This is so usefull bro! Thank you!!
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
15:12 can someone help me it says leaderstat os not a valid member of played
Bro Im learning a lot w man
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 😭
Really good tutorial :D
btw how did you make the icons in explorer look like that?
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
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
thats actually a kinda complicated one for me. idk why tho cuz i am good at remote events but not at remote functions
same
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?
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
"Allright, lets think about this for a minute!" 🤓☝
amazing video, you should make one about Module Script
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
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?
Why Did u not directly Connect the mousebutton event to the remote function in ur local script?
I'm always able to do most of the challenges, but not in the most effective way as does anyone experience the same thing?
From since i reached remote events things just get confusing
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.
tnx a lot and I learned a lot form your videos series
is it bad if we rewatch the videos to help us for the challenge?
it took me 3 days to understand this. im so slow lol
I finished the begginer scripting tutorial today.
you really know its gonna be a hard one when it is 30+ mins
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
Great tutorial !!
What do I need to to if it says that "I'm not authorized to access asset"
When I become successful I’m coming back to pay you I promise ❤
I will be waiting when you become a top tier dev! :)
i dont know how to make something that give me tool but i made gates that you buy it its open
tysm but where did you get the buy sound at the beginning plsss
From the client To the Server To The Sword, WHERES MY CHEZZBURGER I REALLY NEEDED AT🔥🔥🔥🔥
W demonstrations ty
i feel my brain imploding
- - 20:42
this man underrated fr
I DID THE CHALLENGE FINALLY!!
I managed to do the challenge I did re use a little code though. Is that allowed?
Whatever works for you bro!
can you do it with scripts and models?
I failed to do the challenge it’s to hard😅
i think im slowly gettin it
I WAS ABLE TO DO THE CHALLENGE
We need a PROGRAM TOOL!
it doesnt work for me every time i do it, with every tutorial it never works 🙏
well its yo fault
How do you make it so you can only buy one weapon
What do u mean ? If u said how to just have no price just take them of
@@Azalee3 you can buy more then one of a specific item
@@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!
@@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.
@@Lucas-xn5bn oh I fixed a while ago but thanks
Thanks i learnt now
I love watching videos like this and seeing the view count go down with each one as people are all giving up
hmm my brain died
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.
Nice Dedication to scripting I like it
only 898 likes 💀💀
so
@@xavchoc this tutorials are underrated maam
@@ArdaPOLAT-n3x frr
Nice
amazing
I dont recommend ppl to use remote functions its so bad to usr
i have a better chance to learn smt from high school...and im 11😭😭💀😭💀
Sakit na ulo ko
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
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)
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.
i heard you dont need to use waitforchild when trying to find something in replicated storage idk
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)
"Allright, lets think about this for a minute!" 🤓☝