Hello there!. I was wondering how can I call blocks inside a model.
- I would like to make a “math.random()” function where it chooses any model. The model selected gets all of its children (blocks) and make them transparent.
I used GetChildren() and GetDescendants().
Here is my script.
local blue = script.Parent.Blue
local red = script.Parent.Red
local Yellow = script.Parent.Yellow
local ColorDisappearing = math.random(1, 3)
if ColorDisappearing == 1 then
wait(5)
blue:GetDescendants().Transparency = 1
blue:GetDescendants().CanCollide = false
end
if ColorDisappearing == 2 then
wait(5)
red:GetDescendants().Transparency = 1
red:GetDescendants().CanCollide = false
end
if ColorDisappearing == 3 then
Yellow:GetDescendants().Transparency = 0
Yellow:GetDescendants().CanCollide = false
end

The output doesn’t write any mistake or warning with my script, it only prints plugin errors.
Any help is appreciated 
