Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

is it possible to modify every brick in a model without having to do every one of them one-by-one?

Asked by 3 years ago
Edited 3 years ago

i've been making a race track, and i want to make it so people can't go before the race actually starts, so i added walls on every starting position possible, but there is a lot of walls, and i want to be able to make all of them have cancollide set to false at the same time (which is when the race starts), is it possible to adjust all of them at the same time without having to do them individually, as in every part taking up a single line in the script?

0
All you do is use ctrl or command and click each wall until all are sellected and scroll down on properties and click can collide DuckyRobIox 280 — 3y
0
sorry, it was very badly written, i just now edited it to make it easier to understand. ArisNeta 48 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

Yes there is a way to do this!

To be organized make a folder with all the parts you want to block the race track. Put all the parts that block the race in the folder

Function to use: :GetChildren() -- Returns a table of all the children within an object

Code:

for _, part in pairs(Folder:GetChildren()) do
    part.CanCollide = true
end

There is a video on all of the default roblox functions (very useful) : https://www.youtube.com/watch?v=w4k_WRg4da8

I hope this helps!

0
thank you so much! ArisNeta 48 — 3y
0
No problem! IceyTazeForLife 253 — 3y
Ad

Answer this question