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

Help with this resize script?

Asked by
iLegitus 130
10 years ago

So,Im trying to make something resize. Here's what i tried.

while true do
wait()
script.Parent.Size = script.Parent.Size - Vector3.new(0.1, 0.1, 0.1)
end

But it falls off the ground,And into the abyss.

Can anyone tell me someway that i can resize it from its current size to (0.1, 0.1, 0.1)? Without falling? Please help.

2 answers

Log in to vote
0
Answered by 10 years ago
script.Parent.Anchored = true

while script.Parent.Size.X > 0.1 do
wait()
script.Parent.Size = script.Parent.Size - Vector3.new(0.1, 0.1, 0.1)
end

--Or

script.Parent.Size = Vector3.new(0.1, 0.1, 0.1)
Ad
Log in to vote
1
Answered by 10 years ago

You can try this

while script.Parent.Size.X > 0.1 do
    wait()
    script.Parent.Size = script.Parent.Size - Vector3.new(0.1, 0.1, 0.1)
end

1
You do not have to do -- and should not be doing -- coordinate math for this. The formulation of `- Vector3.new(.1,.1,.1)` as in the original post is much better. BlueTaslem 18071 — 10y
0
Alright, thanks for the update. I will keep that in mind. I'll change the script. damagex443 325 — 10y

Answer this question