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

How would I make this repeat?

Asked by
B3blx 5
8 years ago

I have a script (thanks to a user on here). I think I'm doing everything to make it repeat itself continuously, however it is not looping for me.

    local children = script.Parent:GetChildren()
while true do -- put 'time' to how many seconds it takes to choose the next part
    local choosen = children[math.random(42,#children)] 
    local prevTrans = choosen.Transparency 
    choosen.Transparency = choosen.Transparency == 0.5 
    wait(3.5)
    choosen.Transparency = prevTrans
    wait(1.5)
end

Answer this question