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

Make a brick take the color of another brick?

Asked by
DBoi941 57
6 years ago

I am trying to take brick (a) and touch it to brick (b) and brick (b) take the color of brick (a) when they touch.

1local parts = workspace:FindPartsInRegion3(FillArea)
2        for _, part in pairs(parts) do
3            if part.Parent.Name == "NotUsedBlock" then
4            model:GetChildren("Build") do
5            model.Build.BrickColor.new = part.BrickColor
6        end
0
use :GetTouchingParts() greatneil80 2647 — 6y
0
I have question; How does region3 works. i get the fact that its a 3d area but what arguments does region3.new() take and what does each argument mean User#23252 26 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
1local parts = workspace:FindPartsInRegion3(FillArea)
2for _, part in pairs(parts) do
3        if part.Parent.Name == "NotUsedBlock" then
4              part.Touched:Connect(function(otherPart)
5                     otherPart.BrickColor = part.BrickColor
6              end)
7        end
8end
Ad

Answer this question