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

Growing/Shrinking Script Help?

Asked by 10 years ago

I tried making a script that grows and then shrinks a brick and repeats, but it doesn't work. Help Please?

mesh = script.Parent.Mesh

wait(2.5)

repeat
mesh.Scale = mesh.Scale + Vector3.new(0.01,0.01,0.01)
until Mesh.Scale == Vector3.new(1.8,2,1.8)

repeat
mesh.Scale = mesh.Scale - Vector3.new(0.01,0.01,0.01)
until Mesh.Scale == Vector3.new(1.2, 1.4, 1.2)

wait(2.5)

1 answer

Log in to vote
1
Answered by
Sublimus 992 Moderation Voter
10 years ago

You don't actually repeat the loops

while true do -- Will always repeat
mesh = script.Parent.Mesh

wait(2.5)

repeat
mesh.Scale = mesh.Scale + Vector3.new(0.01,0.01,0.01)
until Mesh.Scale == Vector3.new(1.8,2,1.8)

repeat
mesh.Scale = mesh.Scale - Vector3.new(0.01,0.01,0.01)
until Mesh.Scale == Vector3.new(1.2, 1.4, 1.2)

wait(2.5)
end
Ad

Answer this question