Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function connectPart(part)
- part.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChildOfClass('Humanoid') then
- part.BrickColor = BrickColor.Random()
- end
- end)
- end
- -- connect each part
- for _, brick in pairs(workspace.Bricks:GetChildren()) do
- connectPart(brick)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement