FindFirstChild & WaitForChild - Roblox Beginners Scripting Tutorial #14 (2025)

preview_player
Показать описание
DISCORD 📜
Join my Discord Community if you want scripting help, participate in events/challenges, and make friends!

MEMBERSHIPS 🎁
Get Access To My Scripts + More Perks By Becoming a Channel Member! 👇

BEGINNER ROBLOX SCRIPTING SERIES 🟢

ROBLOX GUI TUTORIAL SERIES 🎨

ADVANCED ROBLOX SCRIPTING SERIES 🔴

TWITTER / X 🐦

In this NEW 2024 Guide to Roblox Scripting for Beginner Developers, I will go through everything you need to know to continue scripting on Roblox!
My new mission is to have fun teaching everything I know from developing games on Roblox since 2016. We will dive into scripting concepts as basic as printing to as complicated as raycasting. For every episode of this series, I encourage you to do everything I do to gain experience and let it stick with you so that you can create the games you're passionate about on your own. Enjoy this series and remember: being a competent scripter takes time and effort so don't get discouraged if things get too tricky. Remember where your inspirations came from; if you can be a Roblox scripter, then anyone can!

Tags:
#roblox #robloxstudio #robloxscript #robloxscripting #robloxadvancedscripting #robloxdev #robloxdevelopment #robloxdeveloper #robloxprogramming #scripting #programming #gamedev #gamedevelopment #gamedeveloper #robloxtutorial #robloxscriptingtutorial #howtomakeagameonroblox #robloxhowto #robloxcoding #coding #codingtutorial #codingtutorials #foryou

DOWNLOAD ROBLOX STUDIO HERE:
(On the left side under "Quick Links", click on "Studio" and download)
Рекомендации по теме
Комментарии
Автор

drake’s and chris’s favorite functions

PabTSM-OfficialChannel
Автор

Children definitely scared me the most when I wanted to learn Luau scripting in Roblox Studio, and this video finally took those doubts away. I understand it now.

BloxxingDinosaurus
Автор

Probably one of the easiest to follow tutorials to be created, very helpful, thanks so much!

Also here's my code:

local button = script.Parent
local door = game.Workspace.Door

local opened = false

local function openDoor()
door.Transparency = 0.5
door.CanCollide = false
task.wait(5)
opened = false
door.Transparency = 0
door.CanCollide = true
end


local humanoid =
if humanoid then
if opened == false then
opened = true
openDoor()
end
end
end)

Just a simple working door open code which opens a door for 5 seconds and then closes automatically.

TheCurryKhan
Автор

Summary (pls, brawl, give me food im hungry)

FindFirstChild and WaitForChild are methods of the instances, they allow to look for a child instance inside the instance in which we are calling these methods

Differences:
- FindFirstChild: Looks for the first child it finds with the name specified in the parameter, otherwise returns nil
- WaitForChild: waits for the child with the specified name to load if it hasn't, and then gets it. If it does not exist or has not loaded, it will give an error and will not execute the rest of the code

Other methods:

- FindFirstChildOfClass: Returns the first child whose property "ClassName", matches the parameter we specify (e.g. "Part", "BasePart", ect). If it does not exist, returns nil (by the way, this method uses the :IsA() method to check the class of the object, so this method takes into account the inheritance of classes in Roblox, for example: Part -> BasePart, MeshPart -> BasePart, ect)

- FindFirstChildWhichIsA: This method is the same as FindFirstChildOfClass, only this one does not take into account the class inheritance, so if we pass "BasePart" as parameter, it should not find anything


And there are many more that you can find in the documentation of "Instance" in the Roblox documentation

osakadev
Автор

you should really consider creating a course. not only myself, but other viewers seem to thoroughly understand and conceptualize the concepts you are teaching!

kadencooper
Автор

honestly really simple too, still on day 4 and i created a small obby with falling parts that turned red and faded out and fell after a second. The new formatting of just looking for a parent for the script and giving the parent a name that only STAYS IN THE SCRIPT is so nice for creating multiple parts, instead of having to create a new script for each part i can just re-use the scripts and create multiple parts, its honestly really nice!

a_loozer
Автор

local soulSand = script.Parent



local humanoid =

if humanoid then
humanoid.WalkSpeed = 5
humanoid.JumpHeight = 0
end
end)

anchor
Автор

Okay so, I created a part that speeds you up and slows you down

Speed Up:

local speedPart = workspace.Speed


local humanoid =
if humanoid then
humanoid.WalkSpeed = 30
end
end)

Slow Down:

local slowPart = workspace.Slow


local humanoid =
if humanoid then
humanoid.WalkSpeed = 16
end
end)

Wasn't too difficult following BrawlDev's tutorials. 👍

AdisaMcburnie-ofcv
Автор

the workspace is texture's grandparents 🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯🤯

Water_Vn
Автор

here a tip: if you want to Make sure the part is here you can use:
print("The part is here")
else
warn("The Part isnt there)

basically when it doesnt find the part it warns in the output that there isnt a part that roblox cant find it, if is there then it will print "the part is there", im not an scripter i watch the videos, im just experienced with some coding by a plugin

FrognovYT
Автор

made me realise we are creating an entire family each experience

wickmilla
Автор

im so dumb i spent like 30 minutes confused because my part wasnt turning brown just to find out i forgot to capitalise "C" in cocoa. Then i did the same thing with "Humanoid"...

solarfizz
Автор

3:25 So basically tl;dr a model combines multiple parts into one big frankensteins part, and a folder does nothing other than keeping you organized
(ex. a Book is like a model, since you see it as one object, but a folder of like random test papers is a... folder)

Wuffinz
Автор

I made a code that when you stepped on one of the part materials, it changed the whole floor to that part. Using the new parent function and knowledge of creating scripts inside of parts, I was able to make an individual script in each part.

The scripts went like this for example:

local Grass = script.Parent
basep = game.Workspace.Baseplate


local humanoid =
if humanoid then
basep.BrickColor = BrickColor.new("Forest green")
basep.Material = Enum.Material.Mud

end

end)

Omniatal
Автор

Such and underrated Youtuber. You have helped me so much!

Made this simple script so that when the brick is touched, the character gets a speed boost for 5 seconds:)

local killBrick = script.Parent


local humanoid =

if humanoid then
humanoid.WalkSpeed = 100
task.wait(5)
humanoid.WalkSpeed = 16
end
end)

shequi_
Автор

My man should really get monitized, he’s been putting so much hard work, but YouTube fails to put ads in his videos.

MeowToonYT
Автор

With the folder I grouped our code into a folder called "Notes & Activities" Thank you so much for helping us. 🥰

a_wirlessfork
Автор

I tried to make a killbrick before watching how you u do and I wasn't able to do it bc I was confuse about what fuction has "otherPart". Once I understood what "otherPart" means, I did the script by myself.

PD: Excuse me if my writing is bad xd, In fat, english is not my native languege, I just learing.

Toernest
Автор

this is the most video i rewatched in this series (5 times btw😅) to understand it and try different things with it
im actually enjoy doing codes rn all thanks to you brawl

keme
Автор

Hey! Thank you for these great tutorials! Heres something i made:

local kb = script.Parent
local cooldown = false
local cooldowntimer = 5


local hum =

if cooldown == false then
if hum then
hum.Health = 0

--debounce
cooldown = true
wait(cooldowntimer)
cooldown = false
end
end
end)

Ben_Blox
join shbcf.ru