This transparency loop should take 0.1 transparency every 0.5 seconds, but it won't?
Asked by
5 years ago Edited 5 years ago
This script should minus the parts inside the model's transparency by 0.1 every half a second after a button is clicked, but it only changes the transparency of 1 part.
Script:
01 | local model = workspace.model 1 :GetChildren() |
02 | local button = workspace.button 1. ClickDetector |
04 | button.MouseClick:Connect( function (onclicked) |
06 | for i,v in pairs (model) do |
08 | v.Transparency = v.Transparency - 0.1 |
10 | until v.Transparency = = - 0.1 |