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

Why does this script not turn all parts in model transparent when click detector is clicked?

Asked by 3 years ago

Just wondering why this does not make all parts in a model transparent when the YesClick Detector is clicked.

local model = game.Workspace.TestModel.Model:GetDescendants()
local button = game.Workspace.TestModel.Yes.YesClick

button.MouseClick:Connect(function()

for index, model in pairs(model) do
    model.Transparency = 1

end

Thanks

Answer this question