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 3 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 — 3y
0
like, how to grow the whole thing at once? R_LabradorRetriever 198 — 3y

2 answers

Log in to vote
0
Answered by
Gingerely 245 Moderation Voter
3 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 — 3y
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 — 3y
Ad
Log in to vote
0
Answered by 3 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