Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with this resize script?

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

✓ Accepted answer
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)

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

2 comments

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.

0

Alright, thanks for the update. I will keep that in mind. I'll change the script.

This discussion is preserved as it was. New answers, comments, and votes are closed.