Hey everyone, I’ve been having issues with scripts regarding groups.
Whenever I have multiple parts in a group, if the script requires multiple changes to the part, it will be out of sync
Example: https://gyazo.com/b93e4fd5b78c4882db6e41204057d3f8
Its extremely infuriating to look at.
Is there anything I can do to mitigate any sync issues? (Or will we just have to wait for ROBLOX to fix it)
Thanks in advance.
1 Like
Hello!
Would you mind sending the script that’s causing this behavior? Your question is sort of confusing to me.
grp1 = script.Parent.G1:GetChildren()
while true do
wait(0)
if script.Parent.on.Value == true then
wait(0.2)
for i = 1,#grp1 do
grp1[i].Transparency = 0.9
grp1[i].Light.Brightness = 0.2
wait(0.01)
grp1[i].Transparency = 0.5
grp1[i].Light.Brightness = 1.7
wait(0.01)
grp1[i].Transparency = 0
grp1[i].Light.Brightness = 3
end
wait(0.2)
for i = 1,#grp1 do
grp1[i].Transparency = 0.5
grp1[i].Light.Brightness = 1.7
wait(0.015)
grp1[i].Transparency = 0.9
grp1[i].Light.Brightness = 0.2
wait(0.015)
grp1[i].Transparency = 1
grp1[i].Light.Brightness = 0
end
else
for i = 1,#grp1 do
grp1[i].Transparency = 1
grp1[i].Light.Brightness = 0
end
end
end
I think I know whats causing the problem, you can either create a new thread within each loop ( spawn(function() / coroutines ) or the better option is to use a loop for each change, (if you have the waits inside the loops it will cause this unwanted behavior)
2 Likes
Separating the changes worked! Thanks a bunch!
1 Like
Could you mark this as solved? Thanks.
1 Like