No video

Beginner's Roblox Scripting Tutorial #16 - Random (Beginner to Pro 2019) [FIXED]

  Рет қаралды 216,768

TheDevKing

TheDevKing

Күн бұрын

Пікірлер: 699
@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
@breakpoint634
@breakpoint634 4 жыл бұрын
How do you make the rain on the whole map or baseplate
@VectoorX
@VectoorX 4 жыл бұрын
-- Really Fixed Version local rainstopage = 1 while true do if rainstopage >= 1000 then break end local X = math.random(1,50) local Z = math.random(1,50) rainstopage = rainstopage + 1 local rain = Instance.new("Part",workspace) rain.Size = Vector3.new(0.25, 1.92, 0.41) rain.Transparency = 0.5 rain.Position = Vector3.new(X,17,Z) wait() rain.Touched:Connect(function(hit) if hit.Parent:WaitForChild("Baseplate") then -- Change Baseplate To Your Own Name If The rain Hits That Part It Will disappear rain:Destroy() end end) end
@aurelius1620
@aurelius1620 3 жыл бұрын
Can you use "os.time " instead of tick?
@malikcallum5699
@malikcallum5699 3 жыл бұрын
You prolly dont care at all but does someone know a tool to log back into an instagram account..? I was stupid lost the account password. I would appreciate any assistance you can offer me!
@claytonjad9497
@claytonjad9497 3 жыл бұрын
@Malik Callum Instablaster :)
@64fishbones85
@64fishbones85 3 жыл бұрын
The best thing about his tutorials is that there is happiness. He laughs. Unlike other turotials where they just talk and talk and type with no emotion. This why his tutorial the best.
@PyaraaAarush
@PyaraaAarush 2 жыл бұрын
AGREEEEEEED!
@QUBIQUBED
@QUBIQUBED 2 жыл бұрын
no its that he's easy to understand
@gunk3407
@gunk3407 2 жыл бұрын
@@QUBIQUBED yes
@2xfi844
@2xfi844 Жыл бұрын
@@QUBIQUBED both
@aicenUTG
@aicenUTG Жыл бұрын
fr, other turtorials are just so roboty
@raheen7570
@raheen7570 3 жыл бұрын
Important: if you want to do this with a negative number like -20 make sure you have the lowest number first like local Number = math.random (-40, - 20) It won’t work if you have a higher number first like local Number = math.random (-20,-40) Please reply if you don’t understand Also make sure to like so other people can see this!
@wonny5306
@wonny5306 2 жыл бұрын
hi bread, im a door
@blackpenguiin
@blackpenguiin 2 жыл бұрын
@@wonny5306 o shit a door
@eggiosus
@eggiosus 2 жыл бұрын
yo i have this issue when its (50,-50) and idk what to do
@BenjiChristie05
@BenjiChristie05 2 жыл бұрын
@@eggiosus-50 is first so (-50, 50) as a minus is a smaller number
@olegalcevski5545
@olegalcevski5545 2 жыл бұрын
@@eggiosus i think u need to put the lowest first so made (-50,50)
@dinujupanu
@dinujupanu 2 жыл бұрын
I started scripting in Roblox LUA 3 days ago and I can say that this is the best playlist for it. This is like school but better. You don't have to search for the stuff that you want to learn, since, as a beginner you might not know what else you'd like to or should learn. This just gets it in a good order.
@Kristoff896
@Kristoff896 2 жыл бұрын
beginner at the moment, and yes agreed so hard
@gdog1195
@gdog1195 Жыл бұрын
Agreed
@TmfClipzUnofficial
@TmfClipzUnofficial Жыл бұрын
I take notes on a google Doc and study them every day, and let me tell you, I am making progress! I am able to make a part go invisible and turn off collision!
@asen1712
@asen1712 Жыл бұрын
@@TmfClipzUnofficial nice!
@jessyscookies
@jessyscookies Жыл бұрын
How ya doing now?
@freshpeanut4967
@freshpeanut4967 4 жыл бұрын
It feels nice to learn *With* someone. It’s like we’re in the same boat
@Vitellium
@Vitellium 3 жыл бұрын
Ikr
@bestboi5037
@bestboi5037 2 жыл бұрын
heh
@eggnob7100
@eggnob7100 2 жыл бұрын
@@choppabh3800 lol
@kashmirandal6282
@kashmirandal6282 2 ай бұрын
@@eggnob7100 what
@320linkerbaan24
@320linkerbaan24 19 күн бұрын
But he know how to boat works (Sometimes)
@TheDevKing
@TheDevKing 5 жыл бұрын
Hey guys I AM SO SORRY About the AUDIO on the last video. Seriously it will not happen again! anyways here you guys go if you couldn't understand it before you should be able to now!
@loadingyourdata2131
@loadingyourdata2131 5 жыл бұрын
Thanks!
@finalhourhd8822
@finalhourhd8822 5 жыл бұрын
TheDevKing Please do welding and welding constraints
@nathanielbird5529
@nathanielbird5529 3 жыл бұрын
@@finalhourhd8822 For anyone reading a year later, things like welding and things that aren't directly correlated to scripting are things he likely won't cover, you'll likely find him explaining these briefly in videos about other topics. You're better off looking up welds and constraints on the Roblox Wiki or other KZbinrs.
@finalhourhd8822
@finalhourhd8822 3 жыл бұрын
@@nathanielbird5529 ok I’ll turn off the pc can’t wait for him any longer
@QUBIQUBED
@QUBIQUBED 2 жыл бұрын
@@finalhourhd8822 you've kept your pc on for a YEAR?!?!?! you could just check your NOTIFICATIONS BOX BRO
@xboydubose7254
@xboydubose7254 5 жыл бұрын
Underrated channel, hope you get more popular.
@imperialies6236
@imperialies6236 3 жыл бұрын
even more lol
@imperialies6236
@imperialies6236 3 жыл бұрын
@TalonsDev even even more lol XD
@luftkadettarchives6387
@luftkadettarchives6387 3 жыл бұрын
That aged well.
@jonathanjoestar863
@jonathanjoestar863 3 жыл бұрын
@@luftkadettarchives6387 like a fine wine
@Fluffernater
@Fluffernater 3 жыл бұрын
This channel is the only channel ill accept for the word “underrated”, not even my crap, trash, dumb channel
@stickbotoftheyear9083
@stickbotoftheyear9083 3 жыл бұрын
I have learnt so much from you. I learned how to make a button that spawns stuff, rain(obviously), a disco ball, disappearing and reappearing locks and more. These are the best tutorials on scripting.
@novakice
@novakice 2 жыл бұрын
where u now
@cupcollecter5907
@cupcollecter5907 2 жыл бұрын
@@novakice chicago😰
@HAnK_TOTAL
@HAnK_TOTAL Жыл бұрын
Thanks to you, I got some ideas for training my scripting, I managed to do some things that you could and more! thank you :D
@warjt4737
@warjt4737 3 жыл бұрын
If you want to generate a random decimal, what you can do is generate a number between 1 and 10000, or something like that, and divide that number by a power of ten, to give you decimals. You can change the numbers around until you get your desired random decimal. Hope this helps!
@Fr0stKnight0k0
@Fr0stKnight0k0 2 жыл бұрын
thanks!
@BlueTheCrew
@BlueTheCrew 11 ай бұрын
What would you do to divide it by the power of 10?
@warjt4737
@warjt4737 11 ай бұрын
@@BlueTheCrew A Power of 10 is 10 multipled by itself a certain number of times. For example, 10 to the power of 3 is 10³ or 10 x 10 x 10 or 1000. So you simply need to divide the number by 1000 or your desired power of 10.
@nazdoesstuffYT
@nazdoesstuffYT 8 ай бұрын
Can’t you put decimals in the random function?
@nahunknown19
@nahunknown19 7 ай бұрын
its been 2 years what you doing?@@warjt4737
@slorg_
@slorg_ Жыл бұрын
9:06 you could put it in a game if you add the line Rain.CanCollide = false, then it automatically despawns because of falling through the baseplate
@nebulamess6875
@nebulamess6875 Жыл бұрын
you have no idea how much I've struggled to make an event that'll destroy the raindrops if they fall onto the baseplate or the spawn location. waaaay better than that lol
@TheActualLamplified
@TheActualLamplified Жыл бұрын
idk use the destroy function
@Ameya837
@Ameya837 9 ай бұрын
could also use wait(3) -- the time for which you want it to be spawned Rain.Destroy()
@desiredxeno5656
@desiredxeno5656 4 ай бұрын
@@Ameya837 it makes the rain spawn slower so dont recommend.
@Stormy6310
@Stormy6310 29 күн бұрын
I tried to do wait(2) Rain.Destroy() but since it made the loop go slower i couldnt do that, thank uuuuuuuu so much
@vaeonrblx
@vaeonrblx Ай бұрын
this is my 3rd time trying to learn coding and its actually going pretty well because of you !!!
@ratking6133
@ratking6133 4 жыл бұрын
Tick is actually super cool. It shows the time since January 1st 1970. Usually being used for systems that need to check the time somehow.
@tick6973
@tick6973 3 жыл бұрын
thanks
@aliden8394
@aliden8394 3 жыл бұрын
@@tick6973 LOL
@aliden8394
@aliden8394 3 жыл бұрын
@@tick6973 how's learning going so far
@spring5005
@spring5005 Жыл бұрын
The way he explains it is so simple, and the way he breaks down the code is just different from everybody else. Everything about the tutorial is so engaging and honestly just makes scripting so much more fun and enjoyable. Literally quit trying to script because the developer hub tutorials never explained the terms well or anything they did 😩
@jessyscookies
@jessyscookies Жыл бұрын
How ya doing now?
@thiccmoji
@thiccmoji Күн бұрын
How ya doing now (August 2024)
@thegood_soup
@thegood_soup 18 күн бұрын
I love these tutorials! i used this but also made something where the rain despawns after 3 seconds so it can last much longer! if your wondering how, its actually really simple, here it is: local function destroy() wait(3) Rain:Destroy() end Rain.Touched:Connect(destroy)
@maplegas1056
@maplegas1056 5 жыл бұрын
dude, i never told you this but you really sound like denis daily XD
@TheDevKing
@TheDevKing 5 жыл бұрын
lol a lot of people say I sound like a bunch of different youtubers. You may have seen some videos on my main channel called TapWater
@maplegas1056
@maplegas1056 5 жыл бұрын
@@TheDevKing yeah man, anyway besides that. I really love your scripting videos, I have never told anybody this but you help me out so much, your so cool! Thank you for getting me this far in my scripting experience, I subed the minute I started watching your videos. Thanks man!
@HorodenskiPiotr
@HorodenskiPiotr 3 жыл бұрын
@@maplegas1056 I agree
@StuffLIsrael
@StuffLIsrael 3 жыл бұрын
wait, what?
@youtubeyt2131
@youtubeyt2131 3 жыл бұрын
@@TheDevKing NO
@berd1968
@berd1968 3 жыл бұрын
excitedd to see that im almost done with the beginners tutorial
@burgerboy_20
@burgerboy_20 2 жыл бұрын
You should talk about the Destroy function. It would make the performance of a game with this feature much better.
@dq9832
@dq9832 2 жыл бұрын
Good idea
@Azure546
@Azure546 Жыл бұрын
true, he could use destroy with a touched event to make it dissapear when it falls
@ZZZ_Jaydee
@ZZZ_Jaydee 3 жыл бұрын
This is like the best Scripting tutorial! I have watched so much scripting tutorials and they I didn't really understand them but with you I understand them clearly! Thank you TheDevKing and also congratulations on hitting 50k subs!
@reeeeeeeeeeeeeeeeeeeeeeeee1913
@reeeeeeeeeeeeeeeeeeeeeeeee1913 3 жыл бұрын
300k now lol
@stuntfax9004
@stuntfax9004 Жыл бұрын
@@reeeeeeeeeeeeeeeeeeeeeeeee1913 500k now lol
@thiccmoji
@thiccmoji Күн бұрын
@@stuntfax9004 600k now lol
@rudyranger249
@rudyranger249 2 жыл бұрын
Note: if you want to spawn it around an area (like raining around 0,0,0) you need to use - and + numbers for math.random(-,+) for x, y, and z axis. If you remember those graphs in math problems, you see negative and positive points on the x, y, and z axis. Just think of it like raining around a graph.
@Layththelion21
@Layththelion21 2 жыл бұрын
yeah, that's pretty useful. also it's cool to see there are still people here years later, this guys tutorials are just the best out there
@Arcadecharm
@Arcadecharm 3 ай бұрын
ty!
@kash-games
@kash-games 2 ай бұрын
Not going to lie the basic tutorials are harder then the advanced ones probably because when you get to the advanced ones you know a bit about scripting
@thiccmoji
@thiccmoji Күн бұрын
true
@anime_mixxer2
@anime_mixxer2 3 жыл бұрын
I love these tutorials, now I think I'm starting to understand how to script now a little bit better now. Thank you!🔥
@nitzeeys
@nitzeeys 3 ай бұрын
what game you gonna make
@anime_mixxer2
@anime_mixxer2 3 ай бұрын
@@nitzeeys Idk yet, my PC killed itself 3 yrs ago😭
@Hesxle
@Hesxle 13 сағат бұрын
Bro u are making best tutorials ive ever seen💙
@gamingwithrick371
@gamingwithrick371 4 жыл бұрын
Ok, I don't know how I did it but. I watch half the video before you inserted the RandomNumber into the rain and I somehow figured it out myself yay!!
@thiccmoji
@thiccmoji Күн бұрын
Good job! I know this is 4 years late, but always try to build your own stuff and experiment with different tools!
@Vioz0
@Vioz0 5 жыл бұрын
Cant really see where rain spawns in real life XD
@breakpoint634
@breakpoint634 4 жыл бұрын
XD nice one
@tumble8323
@tumble8323 4 жыл бұрын
I used noclip and found it spawns from the clouds.
@MetaReplication
@MetaReplication 4 жыл бұрын
@@tumble8323 Lmao
@NeoplayzGames
@NeoplayzGames 4 жыл бұрын
@@tumble8323 When you want to tell the truth but also trying not to get wooooshed
@6px
@6px 4 жыл бұрын
yeah lol
@PyaraaAarush
@PyaraaAarush 2 жыл бұрын
I like this guy cause he laughs at literally anything XD BTW I'm not saying that its not good I mean being happy is very good and I like those people idk what I'm even saying now lol
@olikjam1372
@olikjam1372 3 жыл бұрын
these tutorials are great! helped me alot if u wanna learn to script watch this
@tsaroftheunion
@tsaroftheunion Жыл бұрын
I'm finding more and more that programming is literally like learning a language. One of the key aspects of speaking a different language is knowing how to say the same thing in multiple ways. Because if you forget it one way, you can swap to another and still have the same word.
@HamzaIsBoredRn
@HamzaIsBoredRn 2 жыл бұрын
Explaining the parantheses in math.random() : The numbers between the parantheses in the math.random() are just like the position cuz there is a (X,Y,Z) the (1,50) at RandomNumber2 for example is to decide a random position for the Z value in TheDevKing script
@OBzx
@OBzx 5 жыл бұрын
Thank you for the Tutorials keep doing them!
@Ibloop
@Ibloop Жыл бұрын
4:04 crazy enough, that’s mad close to the number of seconds it’s been since 1987
@Mighty000
@Mighty000 5 жыл бұрын
To not make it laggy you could use the destroy function after a few seconds so they wouldn't get destroyed in the sky
@walterclements3957
@walterclements3957 4 жыл бұрын
local function RainShower(Size, Height) while true do wait() local Rain = Instance.new("Part", workspace) Rain.Shape = "Ball" Rain.Size = Vector3.new(Size, Size, Size) Rain.Position = Vector3.new(math.random(50), Height, math.random(50)) Rain.Anchored = false Rain.Material = "Neon" Rain.BrickColor = BrickColor.new("Pastel blue-green") Rain.Touched:Connect(function() wait(0.5) Rain:Destroy() end) end end RainShower(0.5, 50)
@p-s-x741
@p-s-x741 3 жыл бұрын
@@walterclements3957 i think this will make when rain touches another rain it will destroy both of them
@epicdumbgaming8943
@epicdumbgaming8943 2 жыл бұрын
@@p-s-x741 Yeh, you would have to use permatiers and an else statement to make sure its not rain
@sofaritstrue8480
@sofaritstrue8480 2 жыл бұрын
@@walterclements3957 ?
@bopthing1
@bopthing1 2 жыл бұрын
use debris to remove it as it doesn't stop the whole code for a few seconds. like this: game:GetService("Debris"):AddItem(Rain, 5) -- this will delete the rain after 5 secs without yielding the script
@PULUTUR
@PULUTUR 3 жыл бұрын
Tried some of the scripts where it removes the rain after a couple of seconds but it seems like those don't really work anymore. Just for this video you could just do: Rain.CanCollide = false It will have the same effect but it's not efficient. The part just goes through everything and removes itself when it hit the absolute bottom of the game.
@liamm347
@liamm347 2 жыл бұрын
what i did ^
@bopthing1
@bopthing1 2 жыл бұрын
maybe use collision groups with characters?
@eggiosus
@eggiosus 2 жыл бұрын
maybe use the Touched:Connect and then like make it when it touches the baseplate it turns into CanCollide = true
@norvegicus
@norvegicus 2 жыл бұрын
You can use delay to remove the part after a certain amount of time after it's created delay(1, function() - - You can replace the number with any amount of time rain:Destroy() - - Replace rain with the name of your part end)
@Jcob_C
@Jcob_C 2 жыл бұрын
i tried using clones instead of instance to put a script inside them that destroys itself when touched
@scratchsdivinecomedy
@scratchsdivinecomedy Жыл бұрын
We can also use the .Touched and Connect thing so that we can destroy the rain particles everything time they touch the ground.
@HXNRYGD-ARCADE
@HXNRYGD-ARCADE Жыл бұрын
Or we can turn off the collision of the instance so eventually it will go through the baseplate and get destroyed
@kermysu
@kermysu 4 жыл бұрын
Honestly this tutorial is a lot better than others in my opinion because he doesn’t expect u to know nothing at all in the world xD
@mate9713
@mate9713 3 жыл бұрын
perfect rain: local stop = 1 while true do wait() value = value + 1 local RandomNumber = math.random(1,53) local RandomNumber2 = math.random(1, 50) local RandomNumber3 = math.random(1, 20) local Rain = Instance.new("Part", game.Workspace) Rain.Position = Vector3.new(RandomNumber, RandomNumber3, RandomNumber2) Rain.Size = Vector3.new(-1, 2, 0.5) Rain.Transparency = 0.5 Rain.Anchored = false Rain.BrickColor = BrickColor.new("Really blue") if stop == 500 then break end end thank me later.
@p-s-x741
@p-s-x741 3 жыл бұрын
thank you, you said thank me later so i thank you after 3 months!
@timothy7988
@timothy7988 Жыл бұрын
Its 10 pm and i just love it when he makes a mistake. For instance.new(When he says "Oh what the" Or "Oh Crap!" Or "Oh its bouncing! Oh its because I did not anchor it" I always laugh at it 😂)
@monkey_beam_
@monkey_beam_ Жыл бұрын
So, a better way to make rain would be to turn collision off and have it super thin. Good tutorial, boys im getting so close to advanced
@dumbaszs1817
@dumbaszs1817 3 жыл бұрын
Random was one of the things I was always confused about, you saved my life. Thank you!
@granter7860
@granter7860 2 жыл бұрын
Same math random and tables are the once that make me lose interest in scripting but this guy explained it
@thewolker641
@thewolker641 Жыл бұрын
@@granter7860 DUDE SAME
@auzora6147
@auzora6147 4 жыл бұрын
This is my day 2 studying and learning your video, i learned a lot in your videos, right now i can even make my own game, thank you for creating this video for beginners i will watch all your tutorial video scripting beginner and advance, im 16 from philippines its quarantine here and school start october 5 here so i thought studying my childhood game scripting.
@stuntfax9004
@stuntfax9004 2 жыл бұрын
When I am a pro developer who can code anything on roblox I will thank you and probably promote your content
@PlayFroge_gamer
@PlayFroge_gamer Ай бұрын
I love how the caption says deaf king
@cowbanana
@cowbanana 4 жыл бұрын
Omg thank u so much, I've been watching ur begginer's scripting playlist and I made my first ever script :)) I didn't even need to look at the video for a reference (ok i might've forgot about the killpart script but other than that i remembered the rest :D) while true do wait() local NewPart = Instance.new("Part", workspace) RandowSpawner = math.random(0,50) RandowSpawner2 = math.random(0,50) NewPart.Anchored = false NewPart.Size = Vector3.new(0.5, 2, 0.5) NewPart.Position = Vector3.new(RandowSpawner, 50, RandowSpawner2) NewPart.Transparency = 0.5 NewPart.Color = Color3.new(148, 190, 129) NewPart.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health -1 elseif hit.Parent.Baseplate then wait(1) NewPart:Destroy() end end) end (edit - it basically makes rain spawn and if u touch it u lose 1 health, and it gets destroyed once it hits the ground after 1 second)
@beancrusha2596
@beancrusha2596 4 жыл бұрын
goodjob man
@cowbanana
@cowbanana 4 жыл бұрын
@@beancrusha2596 thank : )
@practicalcucumber1395
@practicalcucumber1395 2 жыл бұрын
make it so it gets destroyed when it touches you. also might as well put else instead of elseif and remove "hit.Parent.Baseplate" so the rain gets destroyed whenever it touches anything. That way it doesnt get stuck in another build
@cowbanana
@cowbanana 2 жыл бұрын
@@practicalcucumber1395 i didn't think of that, thanks for the tip! it was just a test script but i'll keep it in mind if i were to ever implement something like that in a game
@meessteenvoorden8398
@meessteenvoorden8398 4 жыл бұрын
Thanks for the tutorials they are making my games so good
@piggygamer2112
@piggygamer2112 3 жыл бұрын
Is it possible to do this: When You touch an object it will randomize a hair on you?
@ralphzt8331
@ralphzt8331 3 жыл бұрын
Local hairstyles = "you decide" Math.random[u decide] And im lazy have access to the hat and make a script wi4th the random
@daales.
@daales. 3 жыл бұрын
Yes
@hyperthekidd
@hyperthekidd 3 жыл бұрын
@@ralphzt8331 you didnt even add a touch event :/
@ralphzt8331
@ralphzt8331 3 жыл бұрын
@@hyperthekidd Its common sense she already know it i want dev kings teaching will be in used so she can fix it am i right?
@ProNeon
@ProNeon 2 жыл бұрын
hey so in 4:14, its actually since Dec 31 1969 or Jan 1 1970 at 00:00:000 UTC its all depending on the timezones, and its related to the Unix Epoch, you can google all that stuff if you want
@ralphzt8331
@ralphzt8331 3 жыл бұрын
2:48 my man knew what i was thinkin minecraft btw Thank you so much for teaching us!
@epocman3438
@epocman3438 3 жыл бұрын
Is it weird im watching this a year later and its helping me
@kamado_king9906
@kamado_king9906 3 жыл бұрын
yea
@freee8581
@freee8581 4 жыл бұрын
Here is how my new shutdown for my core game now works; if the math.random is 15 (1-30) then it tells a string value to take the value. Then I write another script that says if the value is 15 then it activates a successful shutdown. If it gets something else, a different script activates.Called CoreShutdownFail Thanks for the tutorial :D
@Blaze-cz1eu
@Blaze-cz1eu 2 жыл бұрын
I recommend you watch the full video so you can understand it and do not have to keep pausing then typing what he types and you can just put everything in at the end
@AikoGames1214
@AikoGames1214 2 жыл бұрын
Thank you so much such a good reason I needed this in my game!!!
@MeAndSqueeSquee-hn8zw
@MeAndSqueeSquee-hn8zw 12 сағат бұрын
Now I understand random position!
@complex_city
@complex_city Жыл бұрын
I can easily imagine a boss fight being made with this where the random number determines the attack the boss uses (ie local attack = math.random(1, 5) while true do if attack == 1 then --code wait(5) elseif attack == 2 then --code -- etc etc) end
@BlueTheCrew
@BlueTheCrew 11 ай бұрын
omg you just gave me the best idea ever...
@thiccmoji
@thiccmoji Күн бұрын
or maybe an attack could be at the position of where the player was when the code ran, like the attacks in all of those story games lol
@thiccmoji
@thiccmoji Күн бұрын
or maybe an attack could be at the position of where the player was when the code ran, like the attacks in all of those story games lol
@realzombiie
@realzombiie 4 жыл бұрын
I have that problem with math.random that the number stays whenever i want to make it have a new number (Sorry for the bad English ;-;)
@blazepotato2116
@blazepotato2116 3 жыл бұрын
pretty cool tutorial and i like the part that you made the rain
@Yay4ewAnimates
@Yay4ewAnimates Жыл бұрын
Very helpful can't wait for the next tutorial
@Crozanims
@Crozanims Ай бұрын
How can I make the rain fall dispersing in the position of a block, like, appear in different positions of x and z but remain at the same time in the position of a part
@poltermist
@poltermist Жыл бұрын
you could add a part that destroys the rain upon contact with everything like this: rain.Touched:Connect(function() rain:Destroy() end)
@VoxFallen
@VoxFallen Ай бұрын
Hey, if you want to change the color and material of your rain, under the Rain.Anchored = true, write Rain.Material = Enum.Material.Glass -- Or whatever material u want Rain.Color = Color3.new(0.333333, 0.666667, 1) -- or whatever color u want
@DevKay-y4y
@DevKay-y4y 24 күн бұрын
so if i want it a _chance_ to rain would i do if math.random(1, 3) == 3 then -- code end
@unknownedleaf
@unknownedleaf 7 ай бұрын
4:07 WAS THAT THE BITE OF
@alinaandronache9103
@alinaandronache9103 2 жыл бұрын
ive learnt to do it wothout whatching the tut :D thanks so much
@cosmicblox934
@cosmicblox934 4 жыл бұрын
*your tutorials are so nice thanks a lot*
@rostats6451
@rostats6451 2 жыл бұрын
If you want a random demical, you do math.random(1, 10) and divide it by 10 or whatever amount you want it to be
@FolTakX
@FolTakX 2 жыл бұрын
Thank you! This helped out a lot
@boefjurrie5468
@boefjurrie5468 3 жыл бұрын
what you can do, is make 3 more randomnumbers, and use that for the orientation of your rain, i created it and it looks pretty cool!
@ronaldperez1226
@ronaldperez1226 2 жыл бұрын
You could use the same randomNumber variable instead of using three.
@JavierEspinosaYT
@JavierEspinosaYT 3 жыл бұрын
omg thank you so much thedevGOD i was making a job for my game and this helped me SO MUCH thank you 🤩
@AlexPlayz387
@AlexPlayz387 4 жыл бұрын
You could have made it when it touches to tween size to 0.01 in 1~1.5 sec and then :Destroy() it would look cooler :)
@mushkage6428
@mushkage6428 4 жыл бұрын
Alex_playz Kingdom that’s in the advanced tutorial playlist
@YegorDesu7201
@YegorDesu7201 Жыл бұрын
Wow you're actually helped me with it thank you
@dhirenjay8510
@dhirenjay8510 4 ай бұрын
this guy should be more popular
@DanPanMan
@DanPanMan 5 жыл бұрын
Yay, you fixed it!
@VectoorX
@VectoorX 4 жыл бұрын
-- Really Fixed Version local rainstopage = 1 while true do if rainstopage >= 1000 then break end local X = math.random(1,50) local Z = math.random(1,50) rainstopage = rainstopage + 1 local rain = Instance.new("Part",workspace) rain.Size = Vector3.new(0.25, 1.92, 0.41) rain.Transparency = 0.5 rain.Position = Vector3.new(X,17,Z) wait() rain.Touched:Connect(function(hit) if hit.Parent:WaitForChild("Baseplate") then -- Change Baseplate To Your Own Name If The rain Hits That Part It Will disappear rain:Destroy() end end) end
@larryfranklin9106
@larryfranklin9106 3 жыл бұрын
@@VectoorX or simple changed that rain.Touched:Connect(function(hit) if hit.Parent:WaitForChild("Baseplate") then -- Change Baseplate To Your Own Name If The rain Hits That Part It Will disappear rain:Destroy() end end) part to rain.cancolide = false
@VectoorX
@VectoorX 3 жыл бұрын
@@larryfranklin9106 im more advanced now so i know i mean thats an old comment
@larryfranklin9106
@larryfranklin9106 3 жыл бұрын
@@VectoorX i figured that would be true, i was just saying if u stop learning this type of code
@Demonatic.
@Demonatic. 3 жыл бұрын
You can just do "Rain.CanCollide = false" and the rain will go straight through you want the baseplate and eventually just be destroyed.
@akitaprintr
@akitaprintr Жыл бұрын
going under a shelter
@liness1152
@liness1152 3 жыл бұрын
Hey guy's! I do recommend going into studio and making your own version's if these script's so you understand what he's saying and it lock's in and you remember what you just learned.
@liness1152
@liness1152 3 жыл бұрын
Also this is very simple! Just a simple variable equaling a math equation picking a random number in between the number's you set!! I will use this all the Time!!
@Mot0Mot0
@Mot0Mot0 2 жыл бұрын
have you became a successful coder yet?
@Revealed_Potential
@Revealed_Potential 2 жыл бұрын
@@Mot0Mot0 only very few succeed
@amzpakistani3186
@amzpakistani3186 2 жыл бұрын
So I also created a random choice for the size of the parts lol. The choice is between 1 - 10 and it's pretty cool!!
@lukasmasar2973
@lukasmasar2973 2 жыл бұрын
you deserve 2x more subs
@supersaya9-on7dh
@supersaya9-on7dh 8 ай бұрын
guys i made a cool game from this guy great video man
@watterthod2
@watterthod2 Жыл бұрын
7:40 if it doesnt work then its cuz there's no math behind random
@stopmotionnoob5053
@stopmotionnoob5053 Жыл бұрын
One thing you can do for the rain is do rain.cancollide=false then the rain will just go throught the ground
@hacking553
@hacking553 Жыл бұрын
10:03 To be honest games like Greenville and driving games need this but with the rain no colliding
@matthewnelson3763
@matthewnelson3763 3 жыл бұрын
When there's auto generated close captions "okay guys it is the deaf gang here"
@Anonymous-vy7el
@Anonymous-vy7el 4 жыл бұрын
Can you teach us how to make a changing color and material with random waiting time.
@Anonymous-vy7el
@Anonymous-vy7el 4 жыл бұрын
@@sahajem8557 Yes.
@ixpizza_yt
@ixpizza_yt 4 жыл бұрын
how do you make it so when the time is done you get teleported to a certain place?
@sm0kxy
@sm0kxy 2 жыл бұрын
Love this tutorial
@jacobthecat258
@jacobthecat258 3 жыл бұрын
7:43 I thought I was being shown something I had not learned before this time. Random(), Not math.random()?
@vein6801
@vein6801 2 жыл бұрын
same LOL
@realxarox
@realxarox 6 ай бұрын
If you set the rain to Rain.CanCollide = false then it won't affect ur game performace :)
@crafterrium8724
@crafterrium8724 2 жыл бұрын
Guys, if you're having problems with the script and don't know why this might be why in the math. random() you might have the greater number first, ex. math. random(10,4) this won't work so you will have to do this math . random(4,10) this WILL work also put no spaces in between the math and random i did that so youtube wouldn't think it was a link
@jacoobio
@jacoobio 3 жыл бұрын
Pls answer: So how do u make it where if your number was chosen it would show ur number on a Text? Pls pls pls answer. Never mind I watched the if statements! Dude your are so cool u cover everything that my game needed!
@Dynamite_20210
@Dynamite_20210 2 жыл бұрын
Im, confused i made a script that prints a variable representing a random number, and i made it print every second, but everytime it prints, its the same number. But when he did a similar thing in the video, it generated randomly everysingle time
@MegaYarr
@MegaYarr 3 жыл бұрын
I tried combining 2 of your scripts to make my ball change the material and this is what I came up with local RandomNumber = math.random(1,5) if RandomNumber = 1 then game.Workspace["material changing ball"] = ("Plastic") if RandomNumber = 2 then game.Workspace["material changing ball"] = ("Brick") if RandomNumber = 3 then game.Workspace["material changing ball"] = ("Cobblestone") if RandomNumber = 4 then game.Workspace["material changing ball"] = ("Concrate") if RandomNumber = 5 then game.Workspace["material changing ball"] = ("Diamond Plate") end
@stuntfax9004
@stuntfax9004 2 жыл бұрын
Can u explain it
@MegaYarr
@MegaYarr 2 жыл бұрын
@@stuntfax9004 basically every time you touch the ball the code will roll a random number and each number had a material assigned to it so if the random number was 1 the material would turn to plastic if it was 5 it would turn to diamond plate etc.
@balitabory4785
@balitabory4785 2 жыл бұрын
RainDrop.Size = (0.5, 2, 0.5) RainDrop.Position = (RandomNumber, 50, RandomNumber) Why do the commas not work?
@gdchubstep9989
@gdchubstep9989 Жыл бұрын
Trying to write notes for this is becoming harder and harder 😅
@gri150
@gri150 3 жыл бұрын
I glad that KZbin let you to zoom the video because all the small words make my eye hurts
@Apexarxxgames
@Apexarxxgames 2 жыл бұрын
Hello! I have watched all of ur scripting tuts and this one is a little confusing (I’m not trying to hate) I’m probs confused cuz I’m dumb lol
@joyce3224
@joyce3224 3 жыл бұрын
For anyone like me that forgot the rainscript: local RainSpawned = 0 while true do if RainSpawned >= 200 then break end RainSpawned = RainSpawned + 1 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 end
@collosious3597
@collosious3597 Жыл бұрын
you can use the rain in games if you make them non-collide
@infDripman345
@infDripman345 Ай бұрын
i made the parts in the rain spawner realy long and i made a bamboo forest
@jxlpixels3399
@jxlpixels3399 4 жыл бұрын
A simple way to get rid of the rain staying is putting Rain.CanColide = false , then it'll just fall out of the map and disappear.
@marynassuna3792
@marynassuna3792 3 жыл бұрын
i wonder if in the future some person just codes rain that somehow spawns in earth and they can control the weather
@RealCrazeOfficial
@RealCrazeOfficial 3 жыл бұрын
You may not know them, but your voice sounds like the median of Technoblade and Skeppy.
@gigganiggabeater52
@gigganiggabeater52 3 жыл бұрын
if anyone needs this if you want it to get something from a table local messages = {"Hi", "lol", "test", "epic"} print(messages[math.random(1, #messages)] this will print one of the messages might have errors
@vein6801
@vein6801 2 жыл бұрын
is "#" Really needed on tables?
C++ Developer Learns Python
9:26
PolyMars
Рет қаралды 2,7 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 651 М.
I Scripted Your Funny Roblox Ideas.. (Part 23)
9:49
TheDevKing
Рет қаралды 69 М.
I Learned How to SCRIPT in 7 Days | Roblox
11:00
Simjet
Рет қаралды 89 М.
I Updated my Roblox Game in 1 Week!
16:51
SamRoblox
Рет қаралды 342 М.
A Fan Asked Why His Game is Failing...
30:53
RoBuilder
Рет қаралды 141 М.
Remaking Roblox Crossroads In Unreal Engine
11:43
JimboRibz
Рет қаралды 694 М.
I Spent 100 HOURS Making a Game With NO GAME ENGINE
13:42
Fuelvin
Рет қаралды 338 М.
Why Most Roblox Devs Quit (The Sad Truth...)
6:17
SmartyRBX
Рет қаралды 640 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
How much Money does my Free Mobile Game Make?
8:26
Sam Hogan
Рет қаралды 11 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 651 М.