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

How do I write this in a vector3 format?

Asked by 8 years ago

I was making a game that was supposed to shrink the infected parts every 9 seconds. I got everything done, and when I joined, the parts were not shrinking at all. I found some error messages in the console that were saying like Expected Vector3, got number. How do I write this script in a vector3 format?

while true do
wait(1)
script.Parent.Size = script.Parent.Size -1
wait(8)
end

Thanks!

1 answer

Log in to vote
0
Answered by 8 years ago

Size is a group of three numbers so you have to use a Vector3.

while true do
wait(1)
script.Parent.Size = script.Parent.Size - Vector3.new(1,1,1)-- probably want to make the one a smaller number
wait(8)
end

That's how you would apply a vector3. Vectors are also used for position and rotation. Good luck!

0
Thanks so much! TroytheDestroyer 75 — 8y
Ad

Answer this question