#How do I modify this script to work for multiple parts?
1 messages · Page 1 of 1 (latest)
studio noob here> i tried putting them in a group and getting children. it didn't work
You need to loop through them all when you use GetChildren
Look up pair loops in Roblox
Or just loops in general should have info on that
Oh okay, thanks.
Np, Roblox documentation should have it
Also use a folder called door with the parts in it instead of nesting parts
Right now you have a part in a part, just have a door folder with the doors for that
** You are now Level 9! **
Make sure you use the right variables here.
You have nothing named doorChildren, you put the children of On into a variable called door, then used door in the for loops instead of the variable child
It's not Getchildren, it's GetChildren
oh thanks
it keeps giving me an error here but I dont know what that means
do i need an end or something?
It's not an error, you used a breakpoint, so it's stopping there because you told it to stop there.
Just rightclick on the red dot and delete the breakpoint
Does anything change at all?
Nope
Okay, so you tried walking into the button and it didn't do anything
Yeah
I thought it was maybe how I referred to the part.transparency but idk
Should it be something like On:children()
wait no because we made it into a variable already
Okay so it was an error, not that it just didn't work.
You should be using child as the variable, not Part, as you made no variable called Part
I changed it since I tested it
Okay what is it now
But okay thanks, lemme try it
lemme try lowercase
capitalization matters. child not Child