I have a script that when a button is clicked it takes the transparency down by 0.1 until the transparency equals 0 every half a second, but it just stops at 0.9, help?
local button = workspace.button.ClickDetector
local sign = workspace.sign.SurfaceGui.TextLabel
local cover = workspace.cover:GetChildren()
local tower = workspace.tower:GetChildren()
local covertransparency = 1
local button2 = game.Workspace.button2.ClickDetector
for i,v in pairs(tower) do
local towertransparency = 1
button.MouseClick:Connect(function (onclicked)
repeat
v.Transparency = towertransparency - 0.1
until v.Transparency == 0
end)
end
Note: This is only part of the script, ignore the sign and cover variables.

2 comments
the towertransparency always stays at 1 as it doesn't change. Also, this doesn't lower the transparency of parts by 0.1 every half a second but rather almost immediatly due to this script not having an wait(0.5) function
I added in the wait funtion, but what do I change towertransparency too?