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

How to resize a model using Lua?

Asked by 4 years ago

I need to know how to do this to be able to grow models in-game with a script.

0
vector3 danglt 185 — 4y
0
like, how to grow the whole thing at once? R_LabradorRetriever 198 — 4y

2 answers

Log in to vote
0
Answered by
Gingerely 245 Moderation Voter
4 years ago

In roblox api, we can loop through tables that are given to us. Using the for loops!

local Model = workspace.Model:GetChildren() --// this makes a table for us! Model is the table.
for i, v in pairs(Model) do
  v.Size = v.Size * 2
end
0
:) R_LabradorRetriever 198 — 4y
0
ill try it out in my tree growing script, ill accept if it works. I tried directly adding a Vector3 but ill try it out. Thx! R_LabradorRetriever 198 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Use a for i, v in parirs loop and go thought all the children of the model you want to resize, and make them bigger.

Answer this question