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

How do you increase NumberSequence in a loop?

Asked by
Despayr 505 Moderation Voter
5 years ago

I get an error that says Size is a UserData value.

for loop = 1, 15 do
wait(0.5)
script.Parent.Size = script.Parent.Size + NumberSequence.new(1)
end

1 answer

Log in to vote
0
Answered by
jaschutte 324 Moderation Voter
5 years ago

You can't add a vector3 and a numbersequence up. If you want to change the size of the brick constantly, you can use something like this:

local addSize = Vector3.new(0,1,0) --this is the amount it will resize.
for loop = 1, 15 do
    wait(0.5)
    script.Parent.Size = script.Parent.Size + addSize
end

Hope this helps!

0
Thank you, I have been wondering how to use Number Sequences for months. :D Despayr 505 — 5y
Ad

Answer this question