of     1   

wer8888
#183452605Friday, February 12, 2016 9:44 PM GMT

Hi, I'm trying to make a moving wall made of lots of Unions. Lots. I used the for i,v in pairs and a for loop and it moves fine but each of the Unions go individually. Can anyone help? for i,v in pairs (script.Parent:GetChildren()) do if v:IsA("Union") then for i = 1, 300 do v.CFrame = v.CFrame - Vector3.new(0, 0, 0.2) wait(0.001) end end end lesser dog's excitement knows no bounds
JarodOfOrbiter
#183452756Friday, February 12, 2016 9:46 PM GMT

for i = 1, 300 do for i,v in pairs (script.Parent:GetChildren()) do if v:IsA("Union") then v.CFrame = v.CFrame - Vector3.new(0, 0, 0.2) end end wait() end
wer8888
#183452854Friday, February 12, 2016 9:47 PM GMT

It doesn't move at all. im so confused please ;-; lesser dog's excitement knows no bounds
JarodOfOrbiter
#183453141Friday, February 12, 2016 9:51 PM GMT

Oh, it's because the variable is being overwritten (Maybe?). You shouldn't do that. for n = 1, 300 do for i,v in pairs (script.Parent:GetChildren()) do if v:IsA("Union") then v.CFrame = v.CFrame - Vector3.new(0, 0, 0.2) end end wait() end
INOOBE_YT
#183453284Friday, February 12, 2016 9:53 PM GMT

v.CFrame = v.CFrame * CFrame.new(0, 0, 0.2)
wer8888
#183453670Friday, February 12, 2016 9:58 PM GMT

No dice. I even tried changing some variables and other things and mixing in Fribet's stuff but it won't move. Also, excuse my stupidity as my original script didn't even work. ;-; lesser dog's excitement knows no bounds
wonderful72pike
#183453973Friday, February 12, 2016 10:02 PM GMT

for i,v in pairs (script.Parent:GetChildren()) do if v:IsA("UnionOperation") then for i = 1, 300 do v.CFrame = v.CFrame - Vector3.new(0, 0, 0.2) wait(0.001) end end end
wer8888
#183454184Friday, February 12, 2016 10:04 PM GMT

YES THANK YOU PIKE IT WORKED I MIXED IT WITH THE OTHER ONES AND IT WORKS IM DYING HELP ME lesser dog's excitement knows no bounds
wonderful72pike
#183454228Friday, February 12, 2016 10:05 PM GMT

NP :D
JarodOfOrbiter
#183455158Friday, February 12, 2016 10:17 PM GMT

How does that work, Pike? That's exactly what he posted, isn't it? Oh, I see. You changed it to UnionOperation. I wasn't sure about that.

    of     1