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

Why aren't these scripts going at the same rate?

Asked by 9 years ago

Hello! I have been putting some finishing touches on my latest model and have some flashing parts on it. Basicly there are four parts; Two have this script in it:

while true do wait()
wait(0.1)   
    script.Parent.Transparency = 1
    wait(0.1)
    script.Parent.Transparency = 0

end

And the other two have this script in it:

while true do wait()
wait(0.1)   
    script.Parent.Transparency = 0
    wait(0.1)
    script.Parent.Transparency = 1

end

Basicly the parts seem to alternate in an infinite loop. But the problem is they eventualy get unsyncronized and they flash at random times and together it looks really messy. IS ther anyway to stop this?

2
You can synchronize their threads by compacting all four scripts into one. This will result in a more efficient execution, with no visible margin of error. Redbullusa 1580 — 9y
0
^ Goulstem 8144 — 9y

Answer this question