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

How can I change the Transparency values in a :GetChildren() manner?

Asked by 10 years ago

I've tried using FindFirstChild, but that didn't work out. I'm making 6 garage doors that become transparent SLOWLY in a for loop. This is all I tried so far: SCRIPT

while true do
for transp = 1, 0, -.01 do
    local z = Workspace:FindFirstChild("party", true)
    if z then
    z.Transparency = transp
end
    wait()
end
wait()
for transp = 1, 0, .01 do
    local z = Workspace:FindFirstChild("party", true)
    if z then
    z.Transparency = transp
    wait()
end
 end
   end

1 answer

Log in to vote
0
Answered by
Tynezz 0
10 years ago
while true do
for transp = 1, 0, -.01 do
    local z = game.Workspace:GetChildren()
    if z then
for _,v in pairs(z) do
if v.Name == "party" then
    v.Transparency = transp
end
    wait()
end
wait()
for transp = 1, 0, .01 do
     local z = game.Workspace:GetChildren()
    if z then
for _,v in pairs(z) do
if v.Name == "party" then
    v.Transparency = transp
    wait()
end
 end
   end

Ad

Answer this question