Тёмный

Scoping - Roblox Beginners Scripting Tutorial #9 (2024) 

BrawlDev
Подписаться 22 тыс.
Просмотров 29 тыс.
50% 1

DISCORD 📜
Join my Discord Community if you want scripting help, participate in events/challenges, and make friends!
/ discord
MEMBERSHIPS 🎁
Get Access To My Scripts + More Perks By Becoming a Channel Member! 👇
/ @brawldevrblx
BEGINNER ROBLOX SCRIPTING SERIES 🟢
• Roblox Beginners Scrip...
ROBLOX GUI TUTORIAL SERIES 🎨
• Roblox GUI Tutorial Gu...
ADVANCED ROBLOX SCRIPTING SERIES 🔴
• Roblox Advanced Script...
TWITTER / X 🐦
/ brawlbattlerblx
In this NEW 2024 Guide to Roblox Scripting for Beginner Developers, I will go through everything you need to know to continue scripting on Roblox!
My new mission is to have fun teaching everything I know from developing games on Roblox since 2016. We will dive into scripting concepts as basic as printing to as complicated as raycasting. For every episode of this series, I encourage you to do everything I do to gain experience and let it stick with you so that you can create the games you're passionate about on your own. Enjoy this series and remember: being a competent scripter takes time and effort so don't get discouraged if things get too tricky. Remember where your inspirations came from; if you can be a Roblox scripter, then anyone can!
Tags:
#roblox #robloxstudio #robloxscript #robloxscripting #robloxadvancedscripting #robloxdev #robloxdevelopment #robloxdeveloper #robloxprogramming #scripting #programming #gamedev #gamedevelopment #gamedeveloper #robloxtutorial #robloxscriptingtutorial #howtomakeagameonroblox #robloxhowto #robloxcoding #coding #codingtutorial #codingtutorials #foryou
DOWNLOAD ROBLOX STUDIO HERE:
create.roblox.com
(On the left side under "Quick Links", click on "Studio" and download)

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 277   
@daniel_denamit724
@daniel_denamit724 2 месяца назад
crazy that by just looking these videos one by one you see how the views go down and how many people quit this tutroial if you made to this point be proud of your self😁!
@youraveregehaloenjoyer6020
@youraveregehaloenjoyer6020 2 месяца назад
true that
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
people that are still here
@Mickoir
@Mickoir 2 месяца назад
Same, I'm trying my best after giving up a year ago I'm trying again and seeing how it works out, as someone who doesn't know jack about coding, if someone else can learn it then that means I can too. It takes time and effort. Slow and steady wins the race.
@coolkid7377
@coolkid7377 2 месяца назад
@@Mickoir yea i hate learning but at the same time i love coding, so it balances it out for me
@CatsAreCool422
@CatsAreCool422 Месяц назад
@@coolkid7377 its also quite fun and interesting
@Derpysaiyan
@Derpysaiyan Месяц назад
i know a bit about coding already so I'm skimming through some of this, just learned the concept of scoping but it's crazy to me how the views have slowly died down lmfao, yall need to keep going strong 💪
@saifumor
@saifumor 2 месяца назад
Ur incredibly underrated. It's so easy to understand what point you are trying to make. Keep up the good work 😊👌
@snapdragon8723
@snapdragon8723 Месяц назад
For those still having trouble with this part look at the sniper scope example I have provided below. Sniper scope is the most zoomed in when defining a local variable in a function or if statement. (only seeing the head of a dummy) A sniper scope is less zoomed in when you define a local variable in a script. (this range can see the entire body of the dummy.) A sniper scope is the least zoomed in when using a global variable. (this range can see not only the body of this dummy but also many other dummies.) This example is best when used with visuals of a sniper scope training itself on a dummy and then zooming out to see the entire dummy, before finally zooming out to see many dummies. (Unfortunately, I cannot provide an example of such visuals.) You can also provide a similar idea with binoculars or microscope. Edit: I just wanted to add that I thought of a joke you could do where the sniper scope is zoomed in on just a single dummy that has a global variable with the person looking through the scope saying, "A global variable? Were the hell else is this going to be used-" and as they say "used-" they zoom out to see more dummies using the variable and then stop looking through the scope to see an army of dummies using the variable before saying, "Oh, shi-"
@YassinDapruu
@YassinDapruu 5 дней назад
That was a good explanation, to be honest, and you helped me to recognize it, thanks.
@osakadev
@osakadev 3 месяца назад
I'm at school watching this video, priorities
@صاحب-العقل-والمنطق
@صاحب-العقل-والمنطق 3 месяца назад
and im staying up till 4:19 AM just to have the chance to watch this, still priorities
@YellowYarn
@YellowYarn 3 месяца назад
and I’m staying up till. 4:19 AM just to have the chance to watch this, still priorities (chain)
@NicolasLae-u8s
@NicolasLae-u8s 3 месяца назад
@@YellowYarn and I’m staying up till. 4:19 AM just to have the chance to watch this, still priorities (chain)(chain)
@realjackbruhman
@realjackbruhman 3 месяца назад
@@NicolasLae-u8s and I’m staying up till. 4:19 AM just to have the chance to watch this, still priorities (chain)(chain)(chain)
@prodbyjackpit
@prodbyjackpit 3 месяца назад
and im staying up till 4:18 AM just to have the chance to watch this, still priorities (oop mb)
@LaufzDS
@LaufzDS 2 месяца назад
Mate you are amazing at teaching. local function levelOfGyatts() local result = 100 if result == 100 then local thisresult = true print ("thisresult") else local that result = false print ("thatresult") end end levelOfGyatts()
@kingstyn
@kingstyn Месяц назад
level of gyatts? lol
@marwanatta
@marwanatta 18 дней назад
level of what😭🙏
@Cole_22
@Cole_22 2 месяца назад
As a beginner this is the first lua tutorial I actually understand
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
FAXXXX
@SimplyTutuco
@SimplyTutuco 25 дней назад
This was SUPER easy to understand! :D Here's what I did: local daCoolestVariable = 123 local function coolnessFunction() local coolnessResult = daCoolestVariable * daCoolestVariable + daCoolestVariable print(coolnessResult) if coolnessResult == 15252 then local epicnessAmount = coolnessResult * coolnessResult * daCoolestVariable print("Your epicness amount is ", epicnessAmount) else local awesomenessAmount = coolnessResult / 2 print("Your awesomeness amount is ", awesomenessAmount) end end coolnessFunction()
@ghosthunterroblox2549
@ghosthunterroblox2549 2 месяца назад
Bro im actually learning script a thing that i tought i would never learn tysm! One day i watch your tutorials then i practice and then practice again and watch you tutorials this is helping me so much! I hope you get 11k subs!
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
keep up the work!
@tremurra
@tremurra 2 месяца назад
hows the progress going?
@ghosthunterroblox2549
@ghosthunterroblox2549 2 месяца назад
@@tremurra good!
@arbxtrary
@arbxtrary 3 месяца назад
I watched every single DevKing video advanced and beginner and still didnt fully get scripting, ive just started watching you and i already know more than i used too.. great channel definitely recommend
@Vertect
@Vertect 3 месяца назад
Yes amazing, I watched his videos a few times over and got the basics, but he always made mistakes in his videos and wasn't all too concise. BrawlDev is to the point and easy to understand.
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
@@Vertect fax
@CatsAreCool422
@CatsAreCool422 Месяц назад
it also turns out nice and slow, giving powerful scenarios and examples too. even learning objectives.
@nathanallred663
@nathanallred663 Месяц назад
same bro he gets more detailed its awesome like into this folder like the game. into the workshop. into the item like the part then u can say part.material = " Brick" or whatever its so nice
@Rax_Way
@Rax_Way Месяц назад
now this is where it got hard att first i tought lua basics would be easy but now its getting hard however after looking att some comments and practicing am learning more about scoping its about practice ive you ever feel like its to hard keep watching and practicing because you will face many fails but theres nothing stopping you to become a roblox dev
@swordzendile
@swordzendile 20 дней назад
thanks i’ll update you on my journey in a week
@RA-zn9uu
@RA-zn9uu 14 дней назад
@@swordzendile almost a week
@Zynxifier
@Zynxifier Месяц назад
YEEEESSSSSS 15K SUBS CONGRATS BRAWLDEV!!!
@DudeDaMonkey
@DudeDaMonkey 3 месяца назад
bro what underrated videos 👍
@laptopcryptoinsane
@laptopcryptoinsane 3 месяца назад
Bro this channel is so underrated new sub
@glitcharmy8
@glitcharmy8 3 месяца назад
Fr fr
@nonaplayz4789
@nonaplayz4789 3 месяца назад
Lovee ur way of explaining! Really u made things easier for me as a begginer! Tysmmmm
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
fax
@draivitz
@draivitz 2 месяца назад
Had fun with the if statements by making a jackpot print, hope I have fun with the rest of these tutorials
@Kyoryokuna_Fallen
@Kyoryokuna_Fallen 2 месяца назад
another great video 😊very fun.
@JacksonHostutler-ln8ji
@JacksonHostutler-ln8ji 4 дня назад
A function to see if a number is positive, negative, or 0.
@CatsAreCool422
@CatsAreCool422 Месяц назад
local function Scoped() local result = 72 local answer = 42 if answer + result == 114 then local printing1 = true print(printing1) else local printing2 = false print(printing2) end end Scoped()
@loonificated
@loonificated 2 месяца назад
not gonna lie, this one is the most tricky one so far, but even then you make it much easier to understand, thank you!
@LertsPlays
@LertsPlays 2 месяца назад
bro thank you so much you are helping me undertand at the beginning of today i didnt even know what like local and all that stuff was now i fully understand
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
keep up the good work i believe in you!
@Wackygd
@Wackygd Месяц назад
these series of videos are the most helpful ive ever seen this is the script i made from this video local mysecondvari = "string" if mysecondvari == "string" then local number99 = true print(number99) elseif mysecondvari == "string" then local number100 = false print("number100")
@nzm_f6425
@nzm_f6425 29 дней назад
If you are printing values inside a variable by writing the variable. It's without quotation
@JoeyDixonNixon
@JoeyDixonNixon 3 месяца назад
since i already have learned scoping last episode i have nothing here :p Btw your videos are great!
@zolfoxgaming4144
@zolfoxgaming4144 15 дней назад
like i started without knowing anything about coding but with this knowledge I can kind of do it now (well a little bit of it ig). But i still struggle with it alot but i can't thank you enough for these tutorials lol
@snothemonke
@snothemonke 17 дней назад
experimented a bit in my own script. i think im getting better at this! local a = 0.2 local b = 0.5 local baslpat = game.Workspace.Baseplate local function abcaddition(num1, num2) local result = num1 + num2 baslpat.Transparency = result end abcaddition(a, b)
@bonbon620
@bonbon620 2 дня назад
bro how do u not have more then 1m subs. you are like the Kohl of youtube
@Poutto
@Poutto 3 месяца назад
HELL YEAH ANOTHER UPLOAD
@eclergt9926
@eclergt9926 3 месяца назад
I'd add something to this, if your variable is tied to a function or if/else statement, you can reuse that variable name if you are out of the scope of that function/if, else. So for example, like he has in his video, in the if he named his var result1 and in the else result2, but he couldv used result1 as a name again in the else statement. Hopefully I made this clear enough for people to understand.
@yourlocaldoormat
@yourlocaldoormat 2 месяца назад
local sigma = 50 local beta = 10 local function auraBattle() if sigma => beta then sigma = true print("SIGMA HAS MORE AURA") else sigma = false print("SIGMA HAS LOST THE AURA BATTLE") end end auraBattle()
@redithorror-p6t
@redithorror-p6t 2 месяца назад
this is so corny bro
@yourlocaldoormat
@yourlocaldoormat 2 месяца назад
@@redithorror-p6t who gives a fuck if I'm writing 500+ lines of code for a battlegrounds game. It's satire and I didn't have any idea for other variables. Make yourself of use by not bothering me.
@pryt0n180
@pryt0n180 2 месяца назад
@@yourlocaldoormat if @normalperson8743 == is a cornball then @normalperson8745:Destroy() end
@Smite_1
@Smite_1 2 месяца назад
@@yourlocaldoormat Well, Someone is mad
@yourlocaldoormat
@yourlocaldoormat 2 месяца назад
@@Smite_1 im mad at some lazy ass spending his time looking through comments on a scripting tutorial. I'm literally making a game and written over 750 lines of code now. I've coded punching, dashing, blocking, sprinting and more. I have a team working on the game that includes animators, modellers, concept artists, digital artists and more. If your gonna be watching videos like this put it to use and do something with your life.
@diabooteez
@diabooteez 2 месяца назад
I haven’t been to sleep it’s 6 in the morning I’m getting upset bc I can’t keep up, not your fault tho great videos!! They explain perfectly😃👍
@lolghost5041
@lolghost5041 23 дня назад
local function countdown(number) local time = number if time > 0 then time = time - 1 print(time) countdown(time) elseif time == 0 then print("countdown successful") else print("countdown failed") end end countdown(20)
@Chtto88
@Chtto88 3 месяца назад
These videos are goated
@lilwienerree
@lilwienerree 3 месяца назад
love this series. been trying to learn scripting forever and none of the other tutorials helped. this is actually helping me. soon i can build and script
@anchor7549
@anchor7549 Месяц назад
local function simpleAdd(number1, number2) local result = number1 + number2 if result < 5 then local answer1 = "the result is smaller than 5" print(answer1) elseif result > 5 then local answer2 = "the result is greater than 5" print(answer2) end end simpleAdd(1, 10) simpleAdd (1, 3)
@barry0_0
@barry0_0 Месяц назад
im a big fan bro
@anchor7549
@anchor7549 Месяц назад
@@barry0_0 thank you
@cakeobear
@cakeobear 2 месяца назад
🔥🔥🔥🔥🔥🔥
@Croc_Moss
@Croc_Moss 8 дней назад
local function topg() local gyat = 300 if gyat == 300 then local result1 = true print(result1) else local result2 = false print(result2) end end topg()
@BeardedWaleed
@BeardedWaleed Месяц назад
you are A Legend
@spiniks893
@spiniks893 2 месяца назад
local function Test() local result = nil if result == nil then local result1 = true print("yes") else print("No") end end print(result1) Test() correct : local function Test() local result = nil if result == nil then local result1 = true print("yes") print(result1) else print("No") end end Test()
@TrygveJF
@TrygveJF 3 месяца назад
So that's why I get an error in my function, because I forgot to add "local" lol (yet it still works though) Thanks for the explanation, Brawl!
@AphotykHDemin
@AphotykHDemin 2 месяца назад
-- based on the paradox that is pinnochio says his nose is going to grow. local theTruth = 1 local notTheTruth = 1 local function imLying(truth, lie) local result = truth + lie if result == 2 then print("Paradox") end end imLying(theTruth,notTheTruth )
@LiamMJ
@LiamMJ 15 дней назад
Is this roblox builderman
@BalintZsoldos
@BalintZsoldos 2 месяца назад
omg this is help so mutch
@chaloemsak1010
@chaloemsak1010 3 месяца назад
FC , from Thailand . 💕😁
@SabrosoShantee34
@SabrosoShantee34 2 месяца назад
hey i got a question what are your theme colors
@BoredAsf.
@BoredAsf. 2 месяца назад
--scoping is when you make a variable inside a function, which makes it so you cant use that variable outside of the function. -- even if you try to call it, it will not work. and when using "else" it wouldnt work. only when used in the variable. --my own scoping: local function MyCoolFunctionGYATT() local result = 100 if result == 100 then local result1 = "GYATT" print(result1) else local result2 = "NOT GYATT" print(result2) end end was this good?
@bradenknipp9362
@bradenknipp9362 Месяц назад
9:10 so how would you access the value if you wanted to? would it be as simple as just not putting local? if so then why put local in the first place what are the downsides of not putting local
@personguyIII
@personguyIII Месяц назад
local function function1() local variable1 = 3+1 if variable1 == 6 then print("its 6") elseif variable1 == 4 then print("its 4") end end function1()
@Catguy0
@Catguy0 2 месяца назад
local coolcat = game.Workspace.Baseplate local goofycat = 3000 local goatedcat = true local function cutecat() local result = nil if result == nil then local result1 = true print(result1) else local result2 = false print(result2) end end if there is something wrong with it please tell me :)
@JesseMinecraftXD
@JesseMinecraftXD 2 месяца назад
And then there's me thinking you were referring to aiming with a gun. XD
@faintvolley
@faintvolley Месяц назад
next lesson has been completed and I'm still pushing for more! local function catGirlsNyah() local Result = 150 if Result == 150 then local Result1 = true print("Correct!") else local Result2 = false print("Erm... Something doesn't seem quite right, go check your answer again.") end end catGirlsNyah()
@boxblox1986
@boxblox1986 2 месяца назад
local myGrades = math.random(1,100) local function passGrades() return 90 end if passGrades()
@VersatileMC
@VersatileMC 2 месяца назад
Your program is correct and it successfully gives an output But the main topic covered in this video is about whether the program is able to recognize different variables For example if you created the "myGrades" Variable first inside the "passGrades()" Function While the program is comparing if passGrades() function is
@kaymaximoff8162
@kaymaximoff8162 6 дней назад
local function Incendia(number1, number2) local result = 20 local result = number1 + number2 if result == 20 then local resultTrue = true print(resultTrue) else local resultFalse = false print(resultFalse) end end Incendia(15, 2) Incendia(20, 0) Incendia(12, 8) Incendia(18, 2) Incendia(12, 20)
@Krycco
@Krycco 6 дней назад
local function calculate(Number1, Number2, SelectedMath) --peak calculator... ignore the fact it only calculates the bare minimum local Result = nil if SelectedMath == "addition" then Result = Number1 + Number2 elseif SelectedMath == "subtraction" then Result = Number1 - Number2 elseif SelectedMath == "multiplication" then Result = Number1 * Number2 elseif SelectedMath == "division" then Result = Number1 / Number2 end if Result < 100 then local lessThan100 = true print(lessThan100) elseif Result > 100 then local biggerThan100 = true print(biggerThan100) end return Result end local CalculationResult = calculate(10, 5, "addition") print(CalculationResult)
@CutProSK
@CutProSK 2 месяца назад
thanks mate
@Boop_your_nose
@Boop_your_nose 2 месяца назад
local height = 5 local function HeightMeasurement() if height >= 6 then print("Woah your pretty tall") else print("I wish I was 6 feet tall") end end HeightMeasurement()
@HugeDevGames-o2x
@HugeDevGames-o2x 2 месяца назад
this was a little confusing but scense i already know scoping in a lot of ways im just go to the next one (i watched it im not skipping) local myMama = game.Workspace.Baseplate local someNumber = 500 local function myGyat() local result = 8 if result == 7 then local result1 = false print(result1) else print("UnAvailable") end end myGyat() local function holaTr() local result2 = nil if result2 == nil then local result2 = false print(result2) else print("not nil") end end
@leonidganichev3035
@leonidganichev3035 3 месяца назад
Your tutorial guides are amazing! print(Cool) local Cool = "funny" -- this is incorrect local Cool1 = "Notfunny" -- this is correct print(Cool1)
@FireLord-sn4lu
@FireLord-sn4lu Месяц назад
local bPlate = game.Workspace.Baseplate local tTop = game.Workspace.Table.Tabletop local function bPlateVal2() bPlate.Transparency = math.random(0, 1) --not practical but im trying to get it to choose between 0 and .5 and math.random doesnt want to pick decimals and other methods pick a range. return bPlate.Transparency end local bPlateValCheck = bPlateVal2() print(bPlateValCheck) local function bPlateFunc2() if bPlate.Transparency == 0 then bPlate.Material = "Slate" elseif bPlate.Transparency == 1 then bPlate.Transparency = 0 bPlate.Material = "Brick" end end if bPlateValCheck == 0 or 1 then bPlateFunc2() end print(bPlate.Material) Is this acceptable in anyway shape or form?
@RobloxKotykmyy
@RobloxKotykmyy 4 дня назад
example local function Great() local noob = 40 if noob == 40 then local noob = true print(noob) else local noob1 = false print(noob1) end end Great()
@dualsupernova5802
@dualsupernova5802 Месяц назад
local function TheCoolestFunction() local result = "ice" if result == "ice" then local result2 = "stank" print(result2) else local result3 = "super smooth" print(result3) end end TheCoolestFunction()
@RSM_ONION
@RSM_ONION Месяц назад
function Chinese() local Monkey = 200 if Monkey == 100 then print ("OOOOO") else Monkey = 200 print ("Sad") end end Chinese()
@ParadoxFlameOfficial
@ParadoxFlameOfficial 3 месяца назад
local function MyBestBlock() local result = nil if result == nil then local result1 = true print(result1) else local result2 = false print(result2) end end MyBestBlock() local function MyWorstBlock() local Result = 9 if Result == 5 then local Result1 = true print(Result1) else local Result2 = false print(Result2) end end MyWorstBlock()
@eljaitor8558
@eljaitor8558 16 дней назад
local function funcion(n1,n2,n3,n4) result1 = n1 + n3 result2 = n2 + n4 result3 = n2 - n4 if result1 + result2 == 5 and result3 + 2 == 5 or result2 + result1 == 6 then print("you found the numbers, well done") else print("sorry but this isn´t the numbers") end end funcion(2,3,0,0) local function funcion2(n21,n22,n23) result21 = n21 + n22 resutl22 = n21 + n22 + n23 if resutl22 + result21 == 7 or resutl22 + result21 == 6 then print("womp pomp") else print("baaaa") end end funcion2(2,1,1)
@aidandoesanimations
@aidandoesanimations 3 дня назад
This was a pretty easy tutorial! Heres the code: Block = game.Workspace.Block Meteor = game.Workspace.Block Number = 10 local function Printing() BigNumber = 400 SmallNumber = .5 if BigNumber == 500 then print ("500 is a big number!") elseif SmallNumber == .5 then print (".5 is a small number!") end end print (Block) print (Meteor) print (Number) Printing()
@Protectorofzevillagers
@Protectorofzevillagers 19 дней назад
somethinggg local function aVariableIdk() aVariableIdk = nil print(aVariableIdk) if aVariableIdk == nil then print("yes its truee") else print("what how") end end
@soyyoluca5248
@soyyoluca5248 Месяц назад
I wrote this function. It gives you the Weather Report local currentWeather = ("windy") local yesterdayTemperature = (21) local increaseInTemperature = (3) local currentTemperature = (yesterdayTemperature + increaseInTemperature) local function weatherReport() if currentWeather == ("sunny") then print("it is sunny today") elseif currentWeather == ("rainy") then print("it is rainy today") elseif currentWeather == ("windy") then print("it is windy today") elseif currentWeather == ("snowy") then print("it is snowy today") else print("today's weather is insane!") end print("the temperature is") print(currentTemperature) if currentTemperature < yesterdayTemperature then print("it is colder than yesterday") elseif currentTemperature > yesterdayTemperature then print("it's warmer than yesterday") else print("the temperature did not change") end end weatherReport() I already want to know how to make variables change while the game has already been iniciated! Thanks for this tutorials.
@ArthurShin-k6m
@ArthurShin-k6m 25 дней назад
ngl it took me several minutes to find out how your script works. it's amaizing
@AdamXJE
@AdamXJE Месяц назад
local baseplate123 = game.Workspace.Baseplate baseplate123.Transparency = 0.2 if baseplate123.Transparency == 0.5 then local function mission() baseplate123.Transparency = 1 end elseif baseplate123.Transparency == 0.2 then print("Yes it is ver see through.")--The elseif should always act as check before using else that is a last resort. --We can use multiple elseifs. else print("The ifstatement failed!")--This is basically checking if the if statement is correct. --The else statement should always be lined up with the if statement. end
@lakthederg
@lakthederg 2 месяца назад
local baseP = game.Workspace.Baseplate local trueStatement = false local function funkyFunction() _G.trueStatement = true end funkyFunction() print(_G.trueStatement) print(trueStatement) prints true then false. i remembered _G. from a friend and was happy to see it work ;3
@wakashade1235
@wakashade1235 Месяц назад
is there a way to create a variable in one script and then access it in another (without remote events)
@Dev_Siunix
@Dev_Siunix 2 дня назад
local function KAKA() local pop = nil if pop == nil then local Peter = true print(Peter) else local Peter1= false print(Peter1) end end KAKA() ( Ik i got some crazy variables😂😂)
@yumenokoyume
@yumenokoyume Месяц назад
Why is it important to put variables where it should be. What will happen if all variables are global. I'm a newbie in programming. I put my variables everywhere, my program is such a clutter, I variable almost everything outside or globally.
@senh0rsticko497
@senh0rsticko497 День назад
local function Cidade(entrada) local centro = 5; local sorveteria = 2; local museu = 7; local prefeitura = 9; if entrada == 12 then local function Bairro() local praca = 2; local academia =11; local igreja = 12; local function Rua() local lixo = 3; local esgoto = 6; local buero = 8; local function Casa(senha) local quarto = 45; local cozinha = 65; local sala = 1; local banheiro1 = 1.2; print("Estamos em casa!") end if igreja == 12 then Casa(112) end end Rua(); end if centro == 5 then Bairro(); end end end Cidade(12);
@ImZzacc
@ImZzacc 6 дней назад
in this i used multiple scopes and used an elseif local function test() local result = 50 local ohiorizzsigma = 11 if result == 50 then local resulttest = true print(resulttest) elseif ohiorizzsigma == 10 then local resultnonetest = true print(resultnonetest) else local resultfail = false print(resultfail) end end test()
@no-bw8rz
@no-bw8rz Месяц назад
Learning objective: local function LetsGoGambling() local result = 777 if result == 777 then local ICantStopWinning = true print("I can't stop winning") else local result = false print("aw dang it") end end LetsGoGambling()
@wilkas
@wilkas 2 дня назад
I missed explanation how scoping between different script files work, especially in different hierarchy.
@LolmYT
@LolmYT Месяц назад
the only tutorial i suck at is if statements local function cats() local result = 50 if result == 50 then print("50 cats") else if result2 == 20 then print("20 cats") end end end cats()
@cxry2953
@cxry2953 2 месяца назад
local function sub(n1, n2) local res = n1 - n2 if res == 4 then local aRes = res + 1 print(aRes) elseif res == 5 then local bRes = 6 print(res + bRes) else print("The script failed") end end sub(7,2)
@ThatCheeseGuy51
@ThatCheeseGuy51 Месяц назад
-Simple Script for what was taught in the video :D local myAmazingBaseplate = game.Workspace.Baseplate local myBigNumber = 500000 local trueStatement = true local function myGreatFunction() local result = nil if result == nil then local result1 = true print(result1) else local result2 = false print(result2) end end myGreatFunction() local function TheBiggestFunction() local result = 8 if result == 8 then local result1 = true print(result1) elseif result == 10 then local result2 = false print(result2) elseif result == 12 then local result3 = true print(result3) else local result4 = false print(result4) end end TheBiggestFunction()
@Stepnpro2
@Stepnpro2 12 дней назад
the best 🙃🙃
@TheOnlyChunti
@TheOnlyChunti 3 месяца назад
i already went to advanced are you going to make a new series on advanced scripting?
@BrawlDevRBLX
@BrawlDevRBLX 3 месяца назад
No, there won’t be a remake of advanced
@TheOnlyChunti
@TheOnlyChunti 3 месяца назад
@@BrawlDevRBLX oh ok but i love ur videos 💖
@صاحب-العقل-والمنطق
@صاحب-العقل-والمنطق 3 месяца назад
keep going
@HoneySyrupp
@HoneySyrupp 3 месяца назад
@@BrawlDevRBLX will there be an even higher and harder playlist ? 🤭
@thatkidyoyo
@thatkidyoyo 8 дней назад
local function sizeOfMyCocc() local result = 10 if result == 10 then local myResult = true print("Yes its that big") else print("its pretty small") end end sizeOfMyCocc()
@صاحب-العقل-والمنطق
@صاحب-العقل-والمنطق 3 месяца назад
thanks!
@TBGyolo
@TBGyolo Месяц назад
Hey fellas, here is a more complex way of using scoping to determine if a value inside of a part is true or false local function NewBaseplate() local Baseplate = game.Workspace.Baseplate.Value if Baseplate.Value == 10 then local Baseplate2 = "Success: | Baseplate is equal to 10" warn(Baseplate2) else local Baseplate3 = "Error: | Baseplate isn't equal to 10" warn(Baseplate3) end end NewBaseplate()
@ninjaboi_22
@ninjaboi_22 14 дней назад
local baseplate = game.Workspace.Baseplate local function ifStatement(number1, number2) local result = number1 + number2 if result == 14 then baseplate.BrickColor = BrickColor.new("Really red") end end ifStatement(5, 9)
@TheMoonlighty
@TheMoonlighty 2 месяца назад
I tried to do the same but with the number it printed "false" :) local function SillyWilly() local result = 200 if result == 100 then local result1 = true print(ofc) else local result2 = false print(ofc not) end end SillyWilly() i think that's enough for my brain😩
@Ibot-tw9yc
@Ibot-tw9yc 3 месяца назад
aye man, can you script a chassis? I get it wrong EVERYTIME I try it.
@FJGamer1st
@FJGamer1st Месяц назад
This is fire 🔥 (chain) ⬇
@LASER10-l7o
@LASER10-l7o 2 месяца назад
Is it possible to make a variable accessible on all different scripts? If so, how?
@peterparker-p7g
@peterparker-p7g 22 дня назад
remove local cuz local makes it tied to the script u used it in and if you remove it it becomes global meaning it can be used in all scripts it becomes a global variable but i dont recommend it like he said in the vid
@Naz-tj2hv
@Naz-tj2hv 18 дней назад
@@peterparker-p7g why, wouldn't it be useful since u dont need to define a local variable with the same value if ur using it throughout multiple scripts?
@Jexes0001
@Jexes0001 3 месяца назад
Are you making a new advanced playlist?
@BrawlDevRBLX
@BrawlDevRBLX 3 месяца назад
No, there won’t be a remake of advanced
@ThePhoenixEngineer
@ThePhoenixEngineer Месяц назад
local square = game.Workspace["The block"] local largeNumber = 500000 local function TheSquare() local trueStatement = true print(trueStatement) end TheSquare()
@Monkeybloger
@Monkeybloger Месяц назад
And I'm watching this video over and over again so I won't miss a concert because my code doesn't have any errs but in the console it doesn't say anything
@soyyoluca5248
@soyyoluca5248 Месяц назад
Did you remember to call the function after stating it??
@sagiqiux
@sagiqiux 23 дня назад
local function clogged() local result = 100 if result == 100 then local result1 = true print(result1) else local result2 = false print(result2) end end clogged() I forgot to end the function first try so I was confused
@tamarisk.ant330
@tamarisk.ant330 3 месяца назад
local gyatt = 100 local function gyattAmount() if gyatt == 100 then print("HOLY GYATT") else print("take some viagra") end end gyattAmount()
@xxneweraxx7422
@xxneweraxx7422 3 месяца назад
good script g
@boxblox1986
@boxblox1986 2 месяца назад
its the gyat guy
@Ismalellel
@Ismalellel 2 месяца назад
@@boxblox1986 i saw him too lol
@TaintedMod
@TaintedMod 3 месяца назад
local pizza = 8 local function pizzaAmount() if pizza == 8 then print("A whole pizza!") else print("There are missing pizza slices!") end end pizzaAmount()
@miguelitto999
@miguelitto999 Месяц назад
local function epic(num1, num2) local num1 = 5 local num2 = 2 local awnser = num1 - num2 if awnser == 5 then print("YOOOO", awnser) else print(":(", awnser) end end epic()
@Meshiroom
@Meshiroom Месяц назад
local function myBrief() local r = nil if r ==nil then local r1 = true print(r1) else local r2 = false print(r2) end end myBrief()
@DA-hd7vt
@DA-hd7vt 2 месяца назад
its very simple you just need to take a look, memorize and then practice till u get it right without looking at how to do it correctly
@elwenas_yt
@elwenas_yt 2 месяца назад
-- You can't print a variable when it doesn't created yet, example: print(x) local x = "Hello world!" -- This is wrong and it will say "nil", let's do it correctly. local y = "How you doing?" print(y) -- Now it will work. local function x(number1) local result = number1 * 2 return result end local xResult = x(5) print(xResult)
@cubingmaster666
@cubingmaster666 2 дня назад
local function thisIsAFunction(number) local result = number local thisIsAVariable = 10 + number if thisIsAVariable == 69 then print("Ok, you understand it.") end if thisIsAVariable == 10 then print("No, you don't understand it.") end end thisIsAFunction(0) thisIsAFunction(59)
@Ja22yo
@Ja22yo 6 дней назад
could easily save a line by not making the variables and just doing the print but its good practice isnt it local function score() local score = 40 if score >= 85 then local great = "thats a great score" print(great) elseif score >= 50 then local good = "thats a good score" print(good) elseif score
Далее
What Is The Best AI For Roblox Studio Scripting?
10:42
Просмотров 453 тыс.
Кольцо Всевластия от Samsung
01:00
Просмотров 428 тыс.
Starting Your Unity Game Flawlessly (8 Steps)
9:51
Просмотров 11 тыс.
I Tried Making a Game Better Than ChatGPT
15:25
Просмотров 2,1 млн
DON'T Make a Roblox Game Without Watching This First.
27:20
AI Learns to Speedrun Minecraft
21:30
Просмотров 775 тыс.
How Google's Chromium Took Over the Browser World
9:59
I Asked Roblox Billionaires How To Get Rich
41:51
Просмотров 2,6 млн
3 Hours vs. 3 Years of Blender
17:44
Просмотров 5 млн
I Learned How to SCRIPT in 7 Days | Roblox
11:00
Просмотров 117 тыс.