Тёмный
No video :(

Beginner's Roblox Scripting Tutorial #15 - Breaks / Loop Breaking (Beginner to Pro 2019) 

TheDevKing
Подписаться 617 тыс.
Просмотров 148 тыс.
50% 1

Beginner's Roblox Scripting Tutorial #15 - Breaks / Loop Breaking (Beginner to Pro 2019)
HEY GUYS! I'm back and in today's video i am teaching you about loop breaking/ breaks in roblox scripting so yeah I hope you enjoy the video. Be sure to subscribe for more scripting tutorials. Anyways enjoy! :)
Link to Beginner's Tutorial Series:
• Beginner's Roblox Scri...
-- Follow me on twitter! (my name is tapwater because thats my main channel): / realtapwater
- Join my Discord Server to learn and meet other developers!-
/ discord
--What is this series about and who is it for?
So this series is meant for people who really want to learn exactly how to script, if that is you then I promise by the time you watch this whole series you will know exactly how to script on roblox. Anyways be sure to subscribe to see whenever I release a new tutorial and I will see you guys in the next one. Peace!

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

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 450   
@TheDevKing
@TheDevKing 5 лет назад
Hey guys! Be sure to join the discord server if you have any questions or if you would like to meet me! discord.gg/FKcSyRh
@maryberova3945
@maryberova3945 3 года назад
hi
@Jimmyah2273
@Jimmyah2273 3 года назад
hmm, the link doesnt work for me
@l4z3r92
@l4z3r92 2 года назад
weird when i tried to do the rain script again it doesn't work it says that when i put rain.size or anything like that it doesnt work
@oggaraggairoaawfauhaiu31_UN
@oggaraggairoaawfauhaiu31_UN 2 года назад
excuse me, when i put the script inside while true do it works, but whenever i put any script outside of it, instead of spawning lots of rain, it just puts a floating rain block that slowly floats down and teleports back to the top when close to touching the floor, and it spins alot.
@mwafr
@mwafr 2 года назад
@@oggaraggairoaawfauhaiu31_UN comedy
@fridaee
@fridaee 3 года назад
I always thought scripting was hard but with your teaching it's very easy and fun!
@hnxyziz
@hnxyziz Год назад
ong
@domstaydolo3351
@domstaydolo3351 Год назад
@@hnxyziz fr
@zaidqureshi5742
@zaidqureshi5742 Год назад
and his tutorials are smaller than the other youtubers
@domstaydolo3351
@domstaydolo3351 Год назад
@@zaidqureshi5742 fr
@terrybrawlstarsaddict
@terrybrawlstarsaddict Год назад
same
@hook5995
@hook5995 2 года назад
Some better explanation on rainspawned = rainspawned + 1 what's happenign here is that the loop is taking both the variable itself AND the number that "rainspawned" is talking about. Let's say there's 7 rain. This means when you write "rainspawned", it runs and sees "oh that's 7". So when you type "rainspawned = rainspawned + 1" It sees "The variable rainspawned is equal to 7 + 1" thus you get 8, which it runs again and then makes it 8 + 1 so 9, and so on.
@BABAPLAYTOOMUCH
@BABAPLAYTOOMUCH 2 года назад
Ty for this!
@jeremy9760
@jeremy9760 Год назад
Thank you, made a lot of sense!
@nahunknown19
@nahunknown19 7 месяцев назад
@@jeremy9760 how you doin its been one year
@GoldDaPhiny
@GoldDaPhiny 5 месяцев назад
so basically it adds 1
@DaMonkeVr24
@DaMonkeVr24 4 месяца назад
Thanks!
@AvarageMilkEnjoyer
@AvarageMilkEnjoyer 3 года назад
When you see you almost completed the Beginner course and almost can move on to the advanced course 👀
@yxngjace
@yxngjace 3 года назад
Yup I’m excited
@akeem3988
@akeem3988 3 года назад
@@yxngjace same
@tekof4358
@tekof4358 3 года назад
so guys how did it go so far? did you make your game or your still developing?
@yxngjace
@yxngjace 3 года назад
I quit I mean I ain’t proud of it but I did
@tekof4358
@tekof4358 3 года назад
@@yxngjace NOOOOO WHYY?? ITS STILL NOT TO LATE YOU CAN STILL GET BACK!
@Planteron1
@Planteron1 2 года назад
The crazy part was that I was using what I learned from the last videos, to make it where when I hit the block it would spawn another one that kills me. But it was infinite so then I came here and guess what it helped me stop the loop!
@Levi-xx1mj
@Levi-xx1mj 3 года назад
You are the best youtuber for learning to code. 100/10. Would recommend.
@curlsroblox9712
@curlsroblox9712 4 года назад
If you didn’t know, you can change a parts color with scripts! Here is a script that I made on how to make a part change colours: while true do script.Parent.BrickColor = BrickColor.Random() wait(1) end
@Catchity
@Catchity 3 года назад
This is basic
@MichaelR1275
@MichaelR1275 3 года назад
@@Catchity I'm the Gingerbread man!
@Catchity
@Catchity 3 года назад
@@MichaelR1275 Wdym
@MichaelR1275
@MichaelR1275 3 года назад
@@Catchity Your name. Add it to my sentence
@MichaelR1275
@MichaelR1275 3 года назад
@@Catchity Get it yet?
@Bazzar_Studios
@Bazzar_Studios 17 дней назад
I followed the script and then added some of my own code to make the code easily adjustable through some basic global variables. I used to have no idea how to code know i would call my self intermediate thank to your amazing videos.
@codinggemgaming1968
@codinggemgaming1968 3 года назад
OMG THIS TUTORIAL LITERALLY HELPED ME MOVING WALL PROJECT
@lamedev1342
@lamedev1342 5 лет назад
Almost at 1000 subscribers congratulations! I'm gonna watch every advertisement if you monetize cuz you deserve it man!
@mattyaz5850
@mattyaz5850 2 года назад
Tysm man currently my 3rd time watching and learning all the basics I have most of em in mind already. This video was nice and simple and I won't stop scripting ty :)
@mano8057
@mano8057 Год назад
its been 7 months since you wrote this, how has scripting been?
@detcom9140
@detcom9140 Год назад
@@mano8057 how’s yours been?
@mano8057
@mano8057 Год назад
@@detcom9140 Honestly, I learned alot. But as it stands right now I'm working on learning languages and fictional stories. Devving is all about how much motivation you have, there's no chance you won't learn to script unless you don't want to, which was my case. Also I suggest you read the roblox dev wiki to learn to script, 10x faster and little to no devs actually learned from videos
@UltraZeroStudios
@UltraZeroStudios 17 дней назад
@@mano8057 its been one year how has it been now lol
@SPYARMYFFFF
@SPYARMYFFFF День назад
​@UltraCodedZero its been 2 weeks how it been now
@kageman
@kageman 5 лет назад
YAYYYY HES POSTING STILL
@guestlsc0ol
@guestlsc0ol 2 месяца назад
yayayayayaya hes still posting ( lol this comment im commenting on is 4 years ago )
@SPYARMYFFFF
@SPYARMYFFFF 21 час назад
​@@guestlsc0ol 5 year*
@Blackilykat
@Blackilykat 4 года назад
I made a rain that stops when it reachs 500 rain drops: local value = 1 while true do wait() value = value + 1 local TestPart = Instance.new("Part", game.Workspace) TestPart.Anchored = false TestPart.Size = Vector3.new(0.5,2,0.5) TestPart.Position = Vector3.new(0,30,0) TestPart.CanCollide = false TestPart.Transparency = 0.5 TestPart.BrickColor = BrickColor.new("Really blue") print(value) if value == 500 then break end end Is this good?
@TheDevKing
@TheDevKing 4 года назад
nice! :D
@Blackilykat
@Blackilykat 4 года назад
Noob says Codes ur welcome 😊
@xeistan7793
@xeistan7793 4 года назад
use debounces for cooldowns: local debounce = false if debounce == false then debounce = true - this is not false so it wont run again -- do stuff wait(5) - the cooldown time debounce = false - allows script to run again
@xeistan7793
@xeistan7793 4 года назад
CyanRBLX did you learn grammar at school 3 years ago too?
@tajinderkaursyal1312
@tajinderkaursyal1312 4 года назад
Thank you, you saved my computer from getting smashed, I had been trying it for 2 hours.
@mexicanfloppa
@mexicanfloppa Месяц назад
i always thought scripting was hard but with your teaching its fun because when i do the tutorial i dont have to make a full fledged game in my first tut
@DatToxicGuy
@DatToxicGuy Год назад
Really good tutorial! Can't wait for the advanced version! :D
@eioboino9369
@eioboino9369 2 месяца назад
me and my friend decided to make a game an anime battlegrounds game and your videos inspired me like ive never been inspired like this before THX tapwater :D
@fraserglasgow5735
@fraserglasgow5735 4 года назад
rains on and off: feel free to play with the numbers (note:rain will spawn in the middle) while true do wait(5) -- the amount of time until the next batch of rain local RainTime = 0 while true do if RainTime >= 50 then --the number is how long you want it to rain for break end RainTime = RainTime + 1 wait(0.1) local NewPart = Instance.new("Part", game.Workspace) NewPart.Position = Vector3.new(0,20,0) NewPart.Size = Vector3.new(0.25,1,0.25) NewPart.Color = Color3.fromRGB(50,50,200) NewPart.Transparency = 0.7 NewPart.Anchored = false NewPart.Touched:Connect(function() NewPart:Destroy() print("rain was removed") end) end print("the rain has ceased") end
@TheFakePlayerGame
@TheFakePlayerGame 3 года назад
I’d say make rain spawn 500 studs above you and random place, then make it so that when touched ground it despawns. Also make reflectance 1 and it will look like Rain :0
@densylek8779
@densylek8779 2 года назад
you should use random math for pos so xyz values are different
@rileybaxter6634
@rileybaxter6634 2 года назад
i like the idea of the rain getting removed when it hits the ground
@eyurDes
@eyurDes 4 месяца назад
from a guy who didnt know the print script or variables i now can make a game which wont be that trash thx this is teaching script other vids are showing and your teaching
@0_onenottwo
@0_onenottwo 3 года назад
You probably don't need a break in the loop, you can just use a repeat. Make it so it repeats adding to the value each time until it reaches the goal value.
@rudyranger249
@rudyranger249 2 года назад
im 1 year late, you can also just do "while (variable) < 50 do" but yeah he was just teaching how break works.
@0_onenottwo
@0_onenottwo 2 года назад
@@rudyranger249 I forgot I commented that lol
@_r0cksss
@_r0cksss Год назад
@@0_onenottwonot sure if any of you explioit but i was wondering how to create it so i don't need the
@Azure546
@Azure546 Год назад
@@_r0cksss but im pretty sure u cant do it without
@JellybeanSTUDIOS
@JellybeanSTUDIOS 3 года назад
As the great Super Mario has said "Just what I needed!"
@Hesxle
@Hesxle 15 часов назад
Thanksss u are the best u helped me a lot i love ur tutorials ❤❤❤
@keinee2207
@keinee2207 4 года назад
I made my own script OMG i am so happy i slightly understand scripting now from Scripting Tutorial #1 to #15. If you touched the part of the rain you will die. local raindropped = 0 while true do if raindropped >= 1000 then break end raindropped = raindropped +1 wait() local Rain = Instance.new("Part",game.Workspace) Rain.Position = Vector3.new(0,500,5) Rain.Size = Vector3.new(1,1,1) Rain.Material = "Glass" Rain.Transparency = 0.50 Rain.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = 0 end end) end
@havoccrenshaw3416
@havoccrenshaw3416 4 года назад
you'd die on your screen, it's clientside not serverside, go check out his filtering enabled videos talking about how to fix that if you haven't already
@stopfollowingme1261
@stopfollowingme1261 4 года назад
I don’t think it has that problem
@stopfollowingme1261
@stopfollowingme1261 4 года назад
I just tested it and it was seen by the server too
@fructosepear9868
@fructosepear9868 3 года назад
:D same lol i made it random cuz i watched the next vid :p
@MrChaoticCrazed
@MrChaoticCrazed 3 года назад
you can also use the function Takedamage(Number Here) so everytime the rain hits the player, they take that amount of damage such as Rain.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid:TakeDamage(5) end
@wernkaros7517
@wernkaros7517 3 года назад
I LOVE YOU TDK YOUR THE BEST!.YOu have helped me soo much now i am kind of a pro scripter.I help people when they have problems,i dont know what to say.I love you mann tysm
@azillystudios
@azillystudios Год назад
Thank you so much. I had a game-breaking bug in my game, and this fixed it completely.
@bbldrake6651
@bbldrake6651 5 лет назад
Dev Kiing are we getting a discord channel for your channel soon
@TheDevKing
@TheDevKing 5 лет назад
That's a GREAT IDEA! Writing that down and I'm going to be making it soon. Thank you!
@bbldrake6651
@bbldrake6651 5 лет назад
@@TheDevKing you are welcome
@TheDevKing
@TheDevKing 5 лет назад
discord.gg/FKcSyRh I MADE IT!
@IX_4
@IX_4 3 года назад
@@TheDevKing yay
@mrshadow5132
@mrshadow5132 3 года назад
Thank you Dev King, i learning alot with your vids!
@bettheelite3423
@bettheelite3423 2 года назад
ur helping me soo much to learn scripting, and i will be sad if i not liked one of ur tutorials. soo hope ur doing well my guy and continue the good work!
@dreagerd8248
@dreagerd8248 3 года назад
i recommend making a part on the whole map and if the rain hits it it gets destroyed, this is to prevent lag and with that u can make infinite rain.
@levoca-9296
@levoca-9296 3 года назад
I would do something like wait(2) Workspace.Part:Destroy()
@ThawBerry
@ThawBerry 2 года назад
I just did rain.CanCollide = false
@detcom9140
@detcom9140 Год назад
Rain.Touched:Connect(function) Rain:Destroy()
@efec4488
@efec4488 Год назад
nah just use particles
@amiroto8449
@amiroto8449 19 часов назад
@@ThawBerry that is bad because it would cause lag, it will go through the baseplate and even though you wont see it it will cause lag
@anrovlogs2834
@anrovlogs2834 5 лет назад
Finally TheDevking here again i hope you read this comment. Plss make a Keybind tutorial. Subscribed liked 😍
@Ilba8765
@Ilba8765 5 лет назад
Nice tutorial. Keep it up.
@lukediscord4166
@lukediscord4166 2 года назад
Man i love these tutorials
@Kelv161
@Kelv161 3 года назад
Oh man, you are right, i should take a BREAK after watching all of those 14 videos
@baconmasterr
@baconmasterr Месяц назад
Woo hoo! i made it to tutorial 15
@youknowtruthless9067
@youknowtruthless9067 4 года назад
Guys! If your game laggs and you want the rain to keep going then do: while true do wait() local Rain = Instance.new("Part", game.Workspace) Rain.Size = Vector3.new(0.5,2,0.5) Rain.Position = Vector3.new(0,15,0) Rain.Transparency = 0.5 Rain.Anchored = false Rain.CanCollide = false end print("The Loop is Finished!")
@beepbeepimasheep237beepbee3
@beepbeepimasheep237beepbee3 4 года назад
wait() is important.
@scarsfxn8465
@scarsfxn8465 3 года назад
just make sure Rain.CanCollide is false so it falls through the baseplate and you wont have any lag
@sdewwu
@sdewwu 3 года назад
for anyone whose iq is less than average, "CanCollide = false" makes it so the parts (rain) fall through the baseplate and they disappear once its low/deep enough, making it pretty much so it can only contain like a few hundred parts because it's adding and removing them at the same time
@jasminadan2266
@jasminadan2266 3 года назад
@@sdewwu The audience ur comment is directed to wudnt have gotten this far in the first place. Plus, a lot of ppl with average iq didn’t even know that before u ATTACKED them. It’s called the “fall height destroy” property if anyone was wondering.
@sdewwu
@sdewwu 3 года назад
@@jasminadan2266 how did i attack anyone? lmfao soft much
@robotbanana4261
@robotbanana4261 3 года назад
If you’re somehow still confused about variable = variable + 1 It’s taking whatever the current value of the variable and adding one. This will make it increase in value by 1 every time the code is ran.
@Gadavious101
@Gadavious101 3 года назад
it justs adds one to the current value
@robotbanana4261
@robotbanana4261 3 года назад
@@Gadavious101 that’s what I said.
@ImaDonutDev
@ImaDonutDev Год назад
what?? this is not related with this video and everyone knew that
@sab1r.937
@sab1r.937 Год назад
@@ImaDonutDev how is it not related to the video
@sebs31
@sebs31 22 дня назад
this is like school but very fun :D
@naelfg8194
@naelfg8194 2 года назад
Hello, i'm Naël, i'm french and i love your vidéos !
@somefigure
@somefigure 3 года назад
if you don't know instead of writing variable = variable + 1 you can write it a shorter easier way like this variable += 1
@riskygadget4life
@riskygadget4life 10 месяцев назад
Nah this is fun the rain is crazy hecks yooo
@MisterIsmail395
@MisterIsmail395 3 дня назад
Thank you man i also subbed
@Potato_Pizzer
@Potato_Pizzer 3 года назад
Ok, these tutorials or like gold, they work its easy I'm telling you, GOLD
@JaymcJefty
@JaymcJefty Месяц назад
Then there like silver because silver is the best conductor of electricity
@lol_gfk9690
@lol_gfk9690 Год назад
This is where the real fun start
@matthewnelson3763
@matthewnelson3763 4 года назад
So to break it you have to have an if statement and in the if statement you have to tell it when to stop?
@dudewtf836
@dudewtf836 4 года назад
thanks TheDevKing from this i made own lag test game thx so much you deserve much more subs.
@timiarked9592
@timiarked9592 3 года назад
i wanna make like a vibe room game and trying to learn how to script and trying to get a good map down
@khy8
@khy8 4 года назад
it's way easier to do repeat until
@javierplayz
@javierplayz 3 года назад
yep
@takahashikakeru6963
@takahashikakeru6963 3 года назад
i prefer while true do
@techxgamingk2197
@techxgamingk2197 3 года назад
ngl but no, its used more in advanced roblox lua, so the method ur using is fine until teh advanced parts
@amogusamogus8164
@amogusamogus8164 Месяц назад
Its been exactly 5 years that this video got uploaded
@raidyqk
@raidyqk Год назад
I would recommend everyone reading instead of "while" loops to opt for "repeat" loops. Code example for what he did: local rainspawned = 0 repeat rainspawned += 1 --You can also use rainspawned = rainspawned + 1, but as a programmer you are lazy so this is how to save most characters wait(1) local rain = Instance.new("Part") rain.Size = Vector3.new(0.5, 2, 0.5) rain.Position = Vector3.new(0, 15, 0) rain.Transparency = 0.5 rain.anchored = false rain.Parent = game.Workspace --Due to performance issued many scripters opt to name the parent later in the script until rainspawned >= 50 --Use a condition which will never be false if u want to make an infinite loop, but I would recommend using a while loop in that case
@batameez_pasta1809
@batameez_pasta1809 4 года назад
How do you teleport a part to a player and it stays on the player? To have a sign that the rain has stopped.
@bruhmate7195
@bruhmate7195 4 года назад
I tried turning player collision off by using Rain.PlayerCollision = false so it would be like real rain but it didnt wanna work otherwise everything that you taught is going AMAZING! :D
@lobsterman8787
@lobsterman8787 4 года назад
do rain.cancollide = false instead
@ShranauvYT
@ShranauvYT Год назад
its Rain.CanCollide = false but it offs collision for every part in the game
@liangmeng5952
@liangmeng5952 7 месяцев назад
you can also do repeat wait() [function for raining] until [amount of rain variable] == [amount of rain to be rained] which ones better to use? or prefered?
@NexuBlox
@NexuBlox 4 месяца назад
To me Both its Usefull :D
@s2cfake
@s2cfake 4 года назад
can't you just use repeat until? cool though I'm a scripter but i never knew what break did
@teleportationglitch7617
@teleportationglitch7617 2 года назад
you are soo helpful when i started i didn't know what i was doing lol
@33kc.
@33kc. 9 месяцев назад
Some better explanation on rainspawned = rainspawned + 1 so here youre asking the script to add +1 to the original rainspawned value, so for every part dropped the scripts understands it as, ok so for example 10 parts of rain dropped, the scripts understands this in such a way that every part dropped gets added to "10" so it stops at a certain amount (added to the variable)
@YellowPeace
@YellowPeace 2 года назад
Is there a way to make the loop run again when there are less objects then the amount that you put in? (like when they despawn or I pick them up)
@disater12disater
@disater12disater 26 дней назад
Its saying that the "break" shouldnt be there because it should apparently be in a loop when it already is in a loop, can anyone help me?
@baconhair2879
@baconhair2879 4 года назад
But how to make it loop again? Please answer, thank you
@jerse1245
@jerse1245 4 года назад
Functions
@collectiveworld5047
@collectiveworld5047 3 года назад
You will make a wait, then paste the script again.
@shrena3179
@shrena3179 3 года назад
You are the King bro
@Muh594
@Muh594 8 месяцев назад
if you guys dont know what this rainspawn = rainspawn + 1 mean, the meaning is that everytime a part in that while do will add 1 to rainspawn variable (If im wrong correct me in the comment)
@mangaartistshamz8816
@mangaartistshamz8816 4 года назад
Wait, can't you just use wait()???
@whey1444
@whey1444 3 года назад
U could also use repeat until like this: local rainspawn = 0 repeat rainspawn = rainspawn + 1 wait() local rain = Instance.new("Part", game.Workspace) rain.Size = Vector3.new(.5,2,.5) rain.Anchored = false rain.Position = Vector3.new(1,100,1) rain.Transparency = .5 until rainspawn >= 250
@overseer_the_engineer
@overseer_the_engineer 2 года назад
So you just created a inf loop BC you didn't put brake
@whey1444
@whey1444 2 года назад
Not infinite since the * until rainspawn >= 250 * but it works the same as the video's method with break
@llGaIaxyll
@llGaIaxyll 3 года назад
413 he say he don't know how to explain I understand so basically it means that rainspawned variable is 0 then it was rainspawned = rainspawned+1 it means that every second it is adding 1 to rain
@fortfight536
@fortfight536 2 года назад
Thx bro it helped me a lot!
@G7oul
@G7oul Год назад
thanks man finally i know what the break meanss!
@person8316
@person8316 4 года назад
Funny lil script I made :) local words = 0 script.Parent.Touched:Connect(function(player) local hum = player.Parent:FindFirstChild("Humanoid") while true do wait(1) print("hi") words = words + 1 hum.Health = hum.Health - 1 if hum.Health == 10 or words == 100 then break end end end)
@aloo4572
@aloo4572 4 года назад
This'd just kill the player wouldn't it??
@unknown-qm7qi
@unknown-qm7qi 2 года назад
I’m watching all the serie!, Its so cool i learned much It is awesome can u continue it and do roblox script pro?
@dragonflee4763
@dragonflee4763 2 года назад
Automatic sculpture maker lol with the rain thingy local rainspawned = 0 while true do if rainspawned >= 200 then break end rainspawned = rainspawned + 1 wait() local Rain = Instance.new("Part",game.Workspace) Rain.Position = Vector3.new(0,30,0) Rain.Size = Vector3.new(0.5,2,0.5) Rain.Anchored = false Rain.Transparency = 0.5 Rain.CanCollide = true Rain.Touched:Connect(function() wait(0.5) Rain.Anchored = true end) end
@musembifamily1318
@musembifamily1318 7 месяцев назад
ok so if you dont understand while is a loop and if rainspawned = rainspawned + 1 and if its a loop what will it do think rainspawn was 0 and if its rainspawn+1 that becomes 1 and if rain spawn plus 1 again bc its a loop it will be 2 now see the rain goes on till the rain spawn counts to 50 it doesnt have anything to do with the local rain = instance.new it just a timer which counts down to 50 then it breaks everthing incoulding the rain the whole while loop it breaks it have any questions ask
@whatskpoppingg
@whatskpoppingg 2 года назад
broo i understand it now tysm
@javierplayz
@javierplayz 3 года назад
hello this might be the most advanced, working script i've ever done local rainspawned = 0 while true do if rainspawned >= 300 then break end rainspawned = rainspawned + 1 local rainPart = Instance.new("Part", game.Workspace) rainPart.Position = Vector3.new(56,30,0) rainPart.Size = Vector3.new(0.2, 1, 0.2) rainPart.Anchored = false rainPart.CanCollide = false wait(.3) if rainspawned >= 200 then wait(.4) end if rainspawned >= 100 then wait(.7) end end
@Gadavious101
@Gadavious101 3 года назад
You can make it shorter
@CoolAnimation-ld6jr
@CoolAnimation-ld6jr Год назад
btw instead of raincount = raincount + 1 you could just do raincount += raincount
@daky5169
@daky5169 5 лет назад
oh yes hes back
@Selatapey
@Selatapey Год назад
Instead of doing the if statement, you could also just write “while rainspawned
@somerandomdude9712
@somerandomdude9712 3 года назад
You can also use debris to make the ran disappear after a couple seconds.
@nahunknown19
@nahunknown19 7 месяцев назад
how you doing its been 2 years
@somerandomdude9712
@somerandomdude9712 7 месяцев назад
@@nahunknown19 alright, i dont script no more tho
@nahunknown19
@nahunknown19 7 месяцев назад
Emotionnal deception (why everyone quit another guy said that he quit)@@somerandomdude9712
@somerandomdude9712
@somerandomdude9712 7 месяцев назад
@@nahunknown19idk I just got bored of it, I was 13 when I made this comment now I’m turning 16 in a month, so it was just a thing for me from when I was in middle school. Also I got other things to do now.
@liness1152
@liness1152 3 года назад
Another way to make this easier is you can just do: while True do Local Melon = Instance.new("Part",game.workspace) Melon.Size = Vector3.new(0.1,0.2,0.1) Melon.Position = Vector3.new(0,100,0) Melon.Color = Color3.new(170,0,0) Melon.CanCollide = false Melon.Transparency = 0.3 Melon.Anchored = false wait() end I made this after watching most of your tutorials and it's like this but it breaks without using the breaking code but I'm going to use this more often :) thank's for your help this the most understanding amount of tutorial's I've ever watched and me and my team should be coming out with a game very soon. The name of it will be "Escape the School Obby" and it is it supposed to be better than the best one in that category when you search it, it looks amazing right now! -Head Dev at SuPreme Production's
@sacred5492
@sacred5492 2 месяца назад
4:53 how does it know that the variable rainspawned is referring to the amount of the rain that has spawned without you telling it?
@kelk_One
@kelk_One 4 месяца назад
❤Love from France
@yaz3876
@yaz3876 3 года назад
Amazing!
@FaintedHeart
@FaintedHeart 3 года назад
it took me 30 minutes trying to figure out how to do this, and that was all i had to do
@MrWoofWoof03Streams
@MrWoofWoof03Streams 3 дня назад
note what he means is rainspawn = 0 rainspawn = rainspawn + 1 what this basically means is that rainswawn = 0 + 1 after that passes rainspawn = 1 and so on
@mexicanfloppa
@mexicanfloppa Месяц назад
bro spent a minute waffling after "peace out"
@demIsWashedLMFAO
@demIsWashedLMFAO 6 месяцев назад
you can also do : local RainVariable = 1 repeat wait() local Rain = Instance.new("Part", game.Workspace) Rain.Position = Vector3.new(0, 15, 0) Rain.Size = Vector3.new(0.5, 2, 0.5) Rain.Anchored = false Rain.Transparency = 0.5 RainVariable4= RainVariable + 1 until RainVariable == 50 end
@shiko_real
@shiko_real 3 года назад
It has been almost a year since ive seen this and this is the first time im using this
@taqwagroomingcenter3122
@taqwagroomingcenter3122 Месяц назад
tbh when he said to stop the rain i knew what he was going to do in his like past ones he made this while Hotdogs < 5 do tihs mean it will go forever but then he did Hotdogs = Hotdogs + 1 which made it stop at 5
@JackLeeTheFirst
@JackLeeTheFirst 3 года назад
if i wanted it to rain shapes other than a square and a rectangle, how would i do that?
@zerozester5590
@zerozester5590 Год назад
you physically can't but you can find how do i make a circle on youtube and do instance.new all the stuff you know about the circle or anything
@PIinkout
@PIinkout 2 года назад
I don't know why but neither script I write for the rain spawner works, not mine or yours. it only spawns one part and it doesn't apply position, color or anything and only spawns 1 part at the spawn
@Zanais
@Zanais 2 года назад
Make sure it's a "while true do" and there is a "wait()"
@hrg384
@hrg384 3 года назад
scripting got too easy because of this guy
@thinkforname6098
@thinkforname6098 4 года назад
How to do that but with a custom brick?
@rxblo
@rxblo Год назад
I know this video was uploaded 3 years ago, and it is probably dumb to ask for doubt clarification now but if someone can help, that'd be greatly appreciated. So, instead of breaking the loop using an if statement, why not directly do: while RainSpawned < 10 do - - code end Im curious as to when we cant do that and loop breaking comes in handy.
@felix_abm
@felix_abm 8 месяцев назад
finally, a comment that actually says something about this. all I saw in the comment section are just people asking why their codes didn’t work. it’s nice to actually see people who have an iq higher than 20
@portersstuff377
@portersstuff377 3 года назад
I know this is an old video, but I figured I'd share what I made here, since it differs from the video a bit. local rainSpawned = 0 -- Sets up the rain spawn counter while true do -- Loop if rainSpawned % 10 == 0 then -- Prints the rain spawned every 10 rain spawned. print(rainSpawned) end if rainSpawned >= 500 then -- Stops making more rain after 500 rain, ends the loop. break end wait() -- Prevents crashes local Rain = Instance.new("Part",game.Workspace) -- Creates the rain itself, the rest under this is just attributes. Rain.Position = Vector3.new(0,50,0) Rain.Size = Vector3.new(0.5,1.5,0.5) Rain.Transparency = 0.7 Rain.Anchored = false Rain.BrickColor = BrickColor.new(Color3.fromRGB(85, 170, 255)) rainSpawned = rainSpawned + 1 -- Counts rain. end
@detcom9140
@detcom9140 Год назад
I had to go on a 20 minute scavenger hunt to find what the goddamn modulus meant and I regret it
@detcom9140
@detcom9140 Год назад
That is smart though
@portersstuff377
@portersstuff377 Год назад
@@detcom9140 glad you found it helpful
@Stickman_Productions
@Stickman_Productions 3 года назад
I made a game where you have to survive big falling bricks and if you touch them you die. You have to go under a shelter that moves to different places of the map after a minute or two.
@CAUKAIETS
@CAUKAIETS 3 года назад
cant you do this as well? local piens = 1 while piens < 50 do wait (0.05) local zeme = Instance.new("Part", game.Workspace) zeme.Position =Vector3.new(-20, 295.5, -70) zeme.Transparency = 0.5 zeme.Size = Vector3.new(0.5,2,0.5) piens = piens + 1 print(piens) end
@axelaep
@axelaep 5 месяцев назад
almost onto advanced 😜😜😜😜💖💖💖💖👌👌👌👌
@firegacha7952
@firegacha7952 3 года назад
Did I just make a disaster game?? new subscriber.
@user-ld5gq9jn9l
@user-ld5gq9jn9l 10 месяцев назад
How do i make it so when i press a button on a gui it breaks instead if it reaches 250 parts it stops?
@showiestsugar74gaming42
@showiestsugar74gaming42 15 дней назад
There's a shortcut for: rainspawned = rainspawned + 1 shortcut: rainspawned += 1 (btw im a pygame developer for 4 months)
@amateur631
@amateur631 2 года назад
for the rain you can just remove cancollide
@Flex_plosion
@Flex_plosion 4 года назад
But how to make it so that the loop will break when you press a button?
@playformers1238
@playformers1238 3 года назад
same
@aviatorlife4490
@aviatorlife4490 3 года назад
why dont use repeat
@taifengzhizi
@taifengzhizi 2 года назад
local raintime =0 while raintime
Далее
A Fan Asked Why His Game is Failing...
30:53
Просмотров 141 тыс.
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Просмотров 10 млн
I Scripted Your Funny Roblox Ideas.. (Part 22)
10:32
Просмотров 741 тыс.
Playing My Old Roblox Games
24:16
Просмотров 4,6 млн
I Scripted Your Funny Roblox Ideas.. (Part 20)
9:57
Просмотров 836 тыс.
Classic Roblox Games: How Are They Doing?
17:09
Просмотров 291 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 4 млн
How pro Roblox developers learnt to script
10:03
Просмотров 851 тыс.
I Coded Your Terrible Escape Room Ideas into Minecraft
35:51
I Scripted Your Funny Roblox Ideas.. (Part 23)
9:49
Просмотров 69 тыс.
I Spent 6 Years Making Games in Scratch
10:03
Просмотров 330 тыс.