Be sure to leave a comment with any questions you may have! Also be sure to join the discord server to ask questions and meet me, as well as other developers! discord.gg/mKt7RkK
Please answer this I've looked everywhere for this: So in my game, I put a part into a model and I put it as Transparency = 1. Then It gives an error. BUT! I put it as Local RNP = game.Workspace:WaitForChild("RedNeonPart") I run the script, and it says this :" 00:58:14.673 - Infinite yield possible on 'Workspace:WaitForChild("RedNeonPart")'" I need your help bro, Thank you.
@@jacoobio Hey I think I can help ya. I was bored and saw your comment and tried it a little and I found two possible ways to fix it. One way is to put the name of you model after workspace, writing: game.Workspace.TheModelsName: WaitForChild(“RedNeonPart”) or you could just put the parameter “true after” red neon part in the parentheses: game.Workspace:WaitForChild(“RedNeonPart”, true).
Thanks for teaching this, i started scripting on Roblox because its not to complicated like java script, C++, ect. So I thank you for the tutorials I found you and it made me find a hobby I like that one day I hope to turn into a job
Ok heres the update. Im still a begginer scripter and all, But now I can script stuff by myself and I can do my own methods. I was recently hired for a jojo game that its main focus will be combat and not grinding Now I do stuff on my own and I barely need help from others. Ive gotten into raycasting, magnitude and now im probably getting into Modules, I also understand remote events and how much potential they have. Now I can easily learn stuff from the dev forum.
your videos are awesome, theyre easy to understand and short, ive been watching these tutorials starting on the beginners tutorial for about if not two weeks now. even tho this was three years ago, these are very good tutorials
Dude thank you so much! I know this video is old and u will probably not see this but I am still very thankful, scripting has been a dream of mine for a while now but I was pretty clueless. Your tutorials have helped so much!
Hey man I've been binging all your tutorial videos and I have to say they're one of a kind. There might be occasional mishaps but you're one of the best teachers I've seen for this kind of stuff.
If you want to find stuff faster in object browser just press the First letter of the Word and it will go to the First Word with the same letter. Example I press P and it goes to PVAdornment leaving me only 5 more lines down to go to find " Parts " . It has helped me cut the search time in half from scrilling past the letters.
Don't mind this. it is just here for me to paste: --Lesson.2: Commo. Built-In Functions-- local CharacterChildren = game.Workspace.[Player Username]:(GetChildren() --It will return all of the children into a variable. --Paste on next scrip-- --WaitForChild local MyBagguette = game.Workspace.WaitForChild("[YourUsename]") --WaitForChild stops the script from instantly working by waiting for something to avoid errors. --GetService
as someone who uses another programming software to program something else, the worst part of trying to learn how roblox programming works, is that everything is oversimplified and drawn out and its just stuff that i already know how it basicaly works from before or can just guess how it works, because its like, talking about, like, how a variable works for like 5 minuets, and then theres one minuet of being like, acutal usefull information to me.
W tutorial in general I been trying to learn how to script for a year and almost 2 years I tried at the beginning of summer last year but now I'm here again in April working hard to make sure this will be the last time I'm trapped in tutorial hell. Btw Quick tip for remembering stuff if you don't feel like continuing to the next tutorial just make things.
So I know basic scripting (not from your tutorials) but I know the basics. I already knew these, but the thought crossed over me, is ":Clone()" how they do map systems? So I tried it, and yep, I made a random map picker and placer in 30 minutes, just from you using your 3 line clone script lol
I think I'm a little too late to say this, but your problem at 13:30 is that you didn't make the cloned part's parent workspace, the clone's default parent isn't workspace... Dangit spoke too soon you figured it out
yeah i was about to say that but found this comment,anyways i know the script ,here you go local part = game.Workspace.part:Clone() wait(5) part.Parent = workspace part.Position = Vector3.new(1,6,1)
13:43 the reason it did not work is because you did not assign its parent, you would need (for example): part2.Parent = part.Parent Or part2.Parent = game.workspace
13:08 You forgot to parent it. Fixed Script: local Part = game.Workspace.Part wait(5) local Part2 = Part:Clone(game.Workspace) Part2.Parent = game.Workspace Part2.Position = Vector3.new(1,100,1) Edit: Spoke too soon, you got it.
Another common built-in function used is OBJ:GetDescendants() i hope i spelt that right GetDescendants is like getchildren but it returns the children of the children of something so if i had a folder with a part with another part inside of the first part folder:GetDescendants() would give us the part and the child of the part
The reason why your clone didn't show is because the Clone() function clones everything about the instance except for it's parent, so you still need to set the clone's parent to the workspace for it to actually show. Edit: I spoke too soon lol, you did notice that in the video.
If i get a dollar everytime his voice breaks, I'd bought a house already. That aside, the video really helped. I never knew what the Xyz.Parent = abc thing does. Now i do
@@caz8135 If you forgot it again, it just means this "xyz's new parent is equal to abc". A use case might be part.Parent = workspace, which assigns part as a child of the workspace.
4th Tutorial took me a few hours had to make sure I understood fully and took some break's. TheDevKing really explaines well I Know I'm gonna get far with his help
weird question, can you move a part to somewhere else with a script? not like... in the physical game, but in the explorer, if that makes sense, like for example, if i have a sword in ServerStorage, i want it so when someone clicks a block, it goes into StarterPack, how do i make the sword go into starterpack with a script?
The reason why the clone function didn't work is because when you clone something the clone is not parented to anything so you have to parent the clone
Okay so I took it upon myself to try and expand on the lesson about GetChildren, and I hit a roadblock. I wanted to make a script that would destroy the rainblocks we made in a previous tutorial and even after adding 2 supposed checks, with no errors might I add, just isn't working and the parts arent getting destroyed. Can I get some help, here is the script local rainD = game.Workspace:WaitForChild("Folder") wait(0.5) if rainD then print("The rainblocks are here")
wait(0.5)
local rainB = game.Workspace.Folder:GetChildren()
if rainB then print("The gangs all here!") end
wait(1) for i, v in pairs(rainB) do v:Destroy() wait(1) end end
a little animation you can make with GetChildren i would recommend making a pillar of the 3 parts (or however many you want) for it to work better local Parts = game.Workspace.Parts:GetChildren() for i,v in pairs(Parts) do v.Color = Color3.new(1,1,1) wait(0.25) v.Color = Color3.new(1,0.8,0.8) wait(0.25) v.Color = Color3.new(1,0.6,0.6) wait(0.25) v.Color = Color3.new(1,0.4,0.4) wait(0.25) v.Color = Color3.new(1,0.2,0.2) wait(0.25) v.Color = Color3.new(1,0,0) wait(0.5) v:Destroy() end
I have a question, if you can answer this please just comment: The game im making is like Pet Simulator, Pet Swarm but it is more of the Unboxing Simulator. I was wondering if this kind of script is already been taught in taps lesson and if it is then ill just rewatch it. SO basically, I want to add like a model that I can click and if i click it my chaarcter will attack it (not actually attack but mine it since the model is a rock) and then it has a health and the tool i use should have the ddamage that deals to the "rock" im attacking. Then after I finished attacking it, it will go away since its health is gone and it should go away with an animation ( i want it to like get destroyed with an animation) and then it will drop a single rock that will go straight to my inventory if i click it (typical minecraft)then i have to put it on a "extractinator "(like on pet sim 2, they have a golden machine which turns pet into gold when you apply ur pets into it) if i apply my rock that i got from the stone i destroyed into the extratinator i should receive some coins. After the stone is destroyed, it will generate into another location How does that work?
i just realized the variables can read each other if that makes sense these are all so confusing rn dang i thought i finished the beginner scripting series alr-
remember what comments are? alright well use them to organize your code so that it makes sense and stuff i organize my code like this: --Start script print("Server script started --Services local dss = game:getservice("DatastoreService") --References local rep = game.ReplicatedStorage --Modules/Datastores (datastores if needed) local MyModule = require( rep.Modules.MyModule ) --Tables/Arrays/Dictionaries local MyTable = {"apple"} local MyArray = {apple = 1} local MyDictionary = {["apple"] = 1} --Misc variables IsLoaded = false --Functions local MyFunction = function(r) print(r) end --Events game.Players.PlayerAdded:Connect(function(P) MyFunction( P.Name ) end) --Threads (Highly advanced) coroutine.wrap(MyFunction)("Hello, World!") --End script (not really the end but it tells us that all the code is initialized) print("Server script end")
Be sure to leave a comment with any questions you may have! Also be sure to join the discord server to ask questions and meet me, as well as other developers! discord.gg/mKt7RkK
Can you do about ":Connect"?
@@vladimirilyichlenin1147 He already showed us that.
TheDevKing dude your too nice
Please answer this I've looked everywhere for this: So in my game, I put a part into a model and I put it as Transparency = 1. Then It gives an error. BUT! I put it as Local RNP = game.Workspace:WaitForChild("RedNeonPart")
I run the script, and it says this :" 00:58:14.673 - Infinite yield possible on 'Workspace:WaitForChild("RedNeonPart")'"
I need your help bro, Thank you.
@@jacoobio Hey I think I can help ya. I was bored and saw your comment and tried it a little and I found two possible ways to fix it. One way is to put the name of you model after workspace, writing: game.Workspace.TheModelsName: WaitForChild(“RedNeonPart”) or you could just put the parameter “true after” red neon part in the parentheses: game.Workspace:WaitForChild(“RedNeonPart”, true).
We gotta love the fact he is still teaching us even though his parents are sleeping.
does anyone know how old he is
@@aubymori lolololol
Yeah ikr
no need for the comma
@@bloxter6915 sorry didnt know we were in english class
im about to binge watch all of these videos they are so simple, informative and funny. Ill comment when im finished probably in a couple of days
awesome! Have fun man. Make sure you go through the beginners series first if you haven't already :)
@@TheDevKing ty man you taught me how to script
Ven Nex this man learned how to script just so he could hack whaaaaaa-
Eliscips look at his videos and the time stamp of his comment the only reason this man is here is because he wants to exploit 🤦♂️
@@aloo4572 lol he probably didnt script the exploit himself
I genuinely Love you. Merry Christmas
"So find first child, basically what it does" *slight pause* "Is finds the first child"
"The more you know!"
TMYK
This is why I hate his cancerous videos
@@libriumdev Yeah his videos are so shit bro
@?? no u
Thanks for teaching this, i started scripting on Roblox because its not to complicated like java script, C++, ect. So I thank you for the tutorials I found you and it made me find a hobby I like that one day I hope to turn into a job
i really have to thank you i learned a lot of scripting in this 2 days that i have been watching all your series
:-D Do you still script?
k
1 Year Update?
i really dont know if this guy still scripts lmfao
Ok heres the update. Im still a begginer scripter and all, But now I can script stuff by myself and I can do my own methods.
I was recently hired for a jojo game that its main focus will be combat and not grinding
Now I do stuff on my own and I barely need help from others. Ive gotten into raycasting, magnitude and now im probably getting into Modules, I also understand remote events and how much potential they have. Now I can easily learn stuff from the dev forum.
your videos are awesome, theyre easy to understand and short, ive been watching these tutorials starting on the beginners tutorial for about if not two weeks now. even tho this was three years ago, these are very good tutorials
huge respect for him taching us while his parents are asleep, also first time seeing you with valk! nice :)!
15:02 you can do Part2.Parent = Part.Parent instead of doing that, which will make the cloned part match with the original part
very simple
very simple x2
very simple x3
very simple x4
very simple x5
Dude thank you so much! I know this video is old and u will probably not see this but I am still very thankful, scripting has been a dream of mine for a while now but I was pretty clueless. Your tutorials have helped so much!
same bro
If you are confused about WaitForChild it means that it will wait until there is a part that is named the variable.
Thanks! I will put this down in my notes in case I forget what it does
Thank you bro I was confused about that for the longest time
Thank you for these Beginner Series! Truly one of the best ways to start out.
Hey man I've been binging all your tutorial videos and I have to say they're one of a kind. There might be occasional mishaps but you're one of the best teachers I've seen for this kind of stuff.
its this "explanation" that makes me listen better than virtual schooling
I recommend yall messing around and reading a bit of code and understand how it works and stuff. It will make it easier for you to understand
It's summer and yet he makes me want to learn how to code.
highly recommend subbing
rt
also me, im learning to code in summer and it's interesting
really interesting
ikr
@@bonzibuddy3886 yea
@@anthonysoares_0412 Yes because he wants to make Bonzi Buddy version 2 XD
still a living legend. Make a pro series please, for very very complex demonstrations
its been a little late and my parents are sleeping
im binge watching this while my parents are sleeping
If you want to find stuff faster in object browser just press the First letter of the Word and it will go to the First Word with the same letter. Example I press P and it goes to PVAdornment leaving me only 5 more lines down to go to find " Parts " . It has helped me cut the search time in half from scrilling past the letters.
how are these videos so good with no editing whatsoever
i wonder why people dislike your videos, they probably don't understand it. anyways your videos are awesome
Who dislikes his videos?
I don’t know what in the world you are talking about but I’m gonna sub! :)
9:15 sounds like a demon was summoned, anyways good video!
lmao
True facts
1:13 i thought he said "We're going to start off with dead children"
Don't mind this. it is just here for me to paste:
--Lesson.2: Commo. Built-In Functions--
local CharacterChildren = game.Workspace.[Player Username]:(GetChildren() --It will return all of the children into a variable.
--Paste on next scrip--
--WaitForChild
local MyBagguette = game.Workspace.WaitForChild("[YourUsename]") --WaitForChild stops the script from instantly working by waiting for something to avoid errors.
--GetService
google docs left the chat
9:15 when u make a script that plays a bong every midnight
i dont think you know what a bong is 💀
I Really Love these tutorials! You made my scripting carrier!
as someone who uses another programming software to program something else, the worst part of trying to learn how roblox programming works, is that everything is oversimplified and drawn out and its just stuff that i already know how it basicaly works from before or can just guess how it works, because its like, talking about, like, how a variable works for like 5 minuets, and then theres one minuet of being like, acutal usefull information to me.
W tutorial in general I been trying to learn how to script for a year and almost 2 years I tried at the beginning of summer last year but now I'm here again in April working hard to make sure this will be the last time I'm trapped in tutorial hell. Btw Quick tip for remembering stuff if you don't feel like continuing to the next tutorial just make things.
"My parents are sleeping" me: Oh thats how parents work in roblox studio?
Can you do a video about click functions regarding GUI's?
TheDevKing, this video has taught me a lot thank you!
So I know basic scripting (not from your tutorials) but I know the basics. I already knew these, but the thought crossed over me, is ":Clone()" how they do map systems? So I tried it, and yep, I made a random map picker and placer in 30 minutes, just from you using your 3 line clone script lol
nobody:
the dev king :
make sure to leave a like it helps i think
I think I'm a little too late to say this, but your problem at 13:30 is that you didn't make the cloned part's parent workspace, the clone's default parent isn't workspace...
Dangit spoke too soon you figured it out
yeah i was about to say that but found this comment,anyways i know the script ,here you go
local part = game.Workspace.part:Clone()
wait(5)
part.Parent = workspace
part.Position = Vector3.new(1,6,1)
I feel in like a classroom, thanks for this leasson Mr. Dev King
at 9:15 in the video the devking accidentally opens a inter dimensional portal for approximately 3 seconds
lol
so basically findfirstchild means find first child
- tapwater 2019
i love how you managed to mistype --:Destroy() twice
13:43 the reason it did not work is because you did not assign its parent, you would need (for example):
part2.Parent = part.Parent
Or
part2.Parent = game.workspace
No, 2019 (this tutorial) is outdated so many things of his tutorial series dont work anymore due to script changes
@@wart4344 Do you know of any updated tutorials?
500th comment! w channle w videos, tought me everything i know
13:08 You forgot to parent it.
Fixed Script:
local Part = game.Workspace.Part
wait(5)
local Part2 = Part:Clone(game.Workspace)
Part2.Parent = game.Workspace
Part2.Position = Vector3.new(1,100,1)
Edit: Spoke too soon, you got it.
game.workspace*
Don’t capitalize it after game
@@QBitDevs No, don't use that use "workspace" or "game.Workspace" or maybe even "game:GetService("Workspace")"
@@QBitDevs you do capitalize wdym
Idiot
like who do fuck is so idiot to try to correct somebody who still hasn't finished the script :/
yayy new vid
9:15 bro accidentally summoned Cthulu
Facts
These tutorials teach me a lot thank you so muchhh
10:03 love how you have a search tab " Grey "
this man even didnt waste his time editing the video, he just wants to teach us
me: flexes on my friends that I am advanced on TheDevKing tutorials
my older brother: oh i finished it
Your brother: "i have mastered every programming language you can comprehend"
i love how in the other videos he is normal and now he got comes out of nowhere with a valk
Even in 2024 these videos are very useful !!
Another common built-in function used is OBJ:GetDescendants()
i hope i spelt that right GetDescendants is like getchildren but it returns the children of the children of something so if i had a folder with a part with another part inside of the first part
folder:GetDescendants() would give us the part and the child of the part
TYSM!
9:15 accidentally sets off bomb 2 houses down 😂
Lmao the timing
lol
@@aty4282 hold up
@@IX_4 lol
I asked ChatGPT what replicated storage was and it gave me a good detailed answer
Nice video! Btw can you make a tutorial on how to make self moving train/plane/car?
Although it’s so simple, I changed the last tutorial on this video by making it if you touch the wall it gets destroyed instead 😄
anchored = false :tf:
script.YourPartHere.Touched:Connect(function()
script.YourPartHere:Destroy()
end)
I Frickin love ur channel😍😍😍😍
The reason why your clone didn't show is because the Clone() function clones everything about the instance except for it's parent, so you still need to set the clone's parent to the workspace for it to actually show.
Edit: I spoke too soon lol, you did notice that in the video.
You are explaining so good! Respect that
If i get a dollar everytime his voice breaks, I'd bought a house already.
That aside, the video really helped. I never knew what the Xyz.Parent = abc thing does. Now i do
No I don't anymore LMAO
@@caz8135 If you forgot it again, it just means this "xyz's new parent is equal to abc". A use case might be part.Parent = workspace, which assigns part as a child of the workspace.
@@Muchinoi :) thanks. I've quit coding though haha.
@@caz8135 Np! Can I ask why you quit coding? Just curious is all.
@@Muchinoi I lost interest just like that after taking a break to do hs grad exam. I tried to code again but the drive isn't there anymore.
"FindFirstChild() basiclly *TAKING A BIG BREATH* finds the first child"
we don't want to be awake to do our homework but this guy stays awake to teach us ur the legend
4th Tutorial took me a few hours had to make sure I understood fully and took some break's. TheDevKing really explaines well I Know I'm gonna get far with his help
jesus a few hours? did you fall asleep or something?
probably making sure he doesnt forget it or needs to rewatch
@@whitehound4008
"So WaitForChild, is basically it waits for a child."
it basically detects any new instances that are inside of a part/model
Here in 2024, this is still the best tutorial..
I subscribed great vid 😃 and keep scripting
weird question, can you move a part to somewhere else with a script? not like... in the physical game, but in the explorer, if that makes sense, like for example, if i have a sword in ServerStorage, i want it so when someone clicks a block, it goes into StarterPack, how do i make the sword go into starterpack with a script?
just change the parent (sorry for being 9 months late you probs have moved on from this now)
@@dBucketHeadty for helping me and innot4 ik how to do it now
This was so helpful!
We need more ASMR roblox tutorials
your mistakes are pretty helpful tbh
what if you need to get a part that has like 10 siblings that are also named part, but the part you need to get isnt the first child?
please i really gotta know
change the name of the part that you wanna get
@@therealxem but then why not just reference it like (parentInstance).(partInstance)?😭😭im so confused
The reason why the clone function didn't work is because when you clone something the clone is not parented to anything so you have to parent the clone
Part2.Parent = game.Workspace
did you make all of your robux developing and creating games for people on Roblox?
Okay so I took it upon myself to try and expand on the lesson about GetChildren, and I hit a roadblock. I wanted to make a script that would destroy the rainblocks we made in a previous tutorial and even after adding 2 supposed checks, with no errors might I add, just isn't working and the parts arent getting destroyed. Can I get some help, here is the script
local rainD = game.Workspace:WaitForChild("Folder")
wait(0.5)
if rainD then
print("The rainblocks are here")
wait(0.5)
local rainB = game.Workspace.Folder:GetChildren()
if rainB then
print("The gangs all here!")
end
wait(1)
for i, v in pairs(rainB) do
v:Destroy()
wait(1)
end
end
*TheDevKing in last outro!*
so you guys learn about *DiStRoYiNg*
*My dad: OO thats where you learned from*
when using the Clone function make sure to parent it :D
a little animation you can make with GetChildren
i would recommend making a pillar of the 3 parts (or however many you want) for it to work better
local Parts = game.Workspace.Parts:GetChildren()
for i,v in pairs(Parts) do
v.Color = Color3.new(1,1,1)
wait(0.25)
v.Color = Color3.new(1,0.8,0.8)
wait(0.25)
v.Color = Color3.new(1,0.6,0.6)
wait(0.25)
v.Color = Color3.new(1,0.4,0.4)
wait(0.25)
v.Color = Color3.new(1,0.2,0.2)
wait(0.25)
v.Color = Color3.new(1,0,0)
wait(0.5)
v:Destroy()
end
love your videos
tysm, i didnt know about getchildren :D
Thanks for the video! I made a very simple button that gives you a tool!
Did bro let it rip 🤨9:15 lol Great video btw its helping me a lot
So now i know how loading screens are made, they use WaitForChild() and wait for all the assets to load before bringing in the player
"FindFirstChild, basically what it does ................... is it finds the FirstChild" ahh yes, informative.
little tip put it in notes and write like under it or something what it does
i actually figured out the clone one on my own and used serverstorage to clone a rock for an item that makes you drop it
If u are graduated from any channels's basic tutorial. Then it will be totally clear to whoever see this.
This helped me a lot thanks
Great Video Soon i can make my game!
Lol good for you
"so what waitforchild does.. is basically it... it waits for the child"
It waits for the child to load.
I have a question, if you can answer this please just comment:
The game im making is like Pet Simulator, Pet Swarm but it is more of the Unboxing Simulator.
I was wondering if this kind of script is already been taught in taps lesson and if it is then ill just rewatch it.
SO basically, I want to add like a model that I can click and if i click it my chaarcter will attack it (not actually attack but mine it since the model is a rock) and then it has a health and the tool i use should have the ddamage that deals to the "rock" im attacking. Then after I finished attacking it, it will go away since its health is gone and it should go away with an animation ( i want it to like get destroyed with an animation) and then it will drop a single rock that will go straight to my inventory if i click it (typical minecraft)then i have to put it on a "extractinator "(like on pet sim 2, they have a golden machine which turns pet into gold when you apply ur pets into it) if i apply my rock that i got from the stone i destroyed into the extratinator i should receive some coins.
After the stone is destroyed, it will generate into another location
How does that work?
Make a vid on how to script Cleaning your bedroom lol
house.room:GetChildren() for i, v in pairs(room) do v:Clean() wait(1) end
@@whirlswirl27 XD
Congratulations For Buying The Most Expensive Non Limited Hat
i just realized the variables can read each other if that makes sense these are all so confusing rn dang i thought i finished the beginner scripting series alr-
remember what comments are? alright well use them to organize your code so that it makes sense and stuff i organize my code like this:
--Start script
print("Server script started
--Services
local dss = game:getservice("DatastoreService")
--References
local rep = game.ReplicatedStorage
--Modules/Datastores (datastores if needed)
local MyModule = require( rep.Modules.MyModule )
--Tables/Arrays/Dictionaries
local MyTable = {"apple"}
local MyArray = {apple = 1}
local MyDictionary = {["apple"] = 1}
--Misc variables
IsLoaded = false
--Functions
local MyFunction = function(r)
print(r)
end
--Events
game.Players.PlayerAdded:Connect(function(P)
MyFunction( P.Name )
end)
--Threads (Highly advanced)
coroutine.wrap(MyFunction)("Hello, World!")
--End script (not really the end but it tells us that all the code is initialized)
print("Server script end")
bro I keep on forgetting that tapwater and dev king are both the same people
FIndFirstChild is like you use DFS to find the first one which satisfies the condition in a tree of folders with the root of the tree is workspace LOL
At which video did you explained about the "for i, v in pairs" thing?
Last episode of beginner series
8:25 findfirstchild() clone() destory() WaitforChild() GetChildren()
All right ! I hope I can be an expert like you some day 😎
Won’t the location of the part (game.Workspace) be in the parameter of clone? Like clone (Workspace)
No, its nil and u have tp change it