I need to change the size of a model, but I don't know how. I tried using setprimarypartCFrame, but I only know how to set position using that. Any help would be appreciated. Thanks!
-cheez
I need to change the size of a model, but I don't know how. I tried using setprimarypartCFrame, but I only know how to set position using that. Any help would be appreciated. Thanks!
-cheez
SetPrimaryPartCFrame only sets the position and should only be used for teleportations and other stuff. I recommend learning about in pairs loops and Part.Size. I'm assuming you're using Workspace for the model, and the script's parent is the model.
local model = script.Parent:GetChildren()
for i, v in pairs(model) do --in pairs loops loop through tables. Use this method as it is more efficient.
if v:IsA("BasePart") then--This is to check for any parts. If there is an accessory or something like that, it will ignore it.
v.Size = v.Size * 2
end
end
Unfortunately, that wouldn't work, because the parts would duplicate in size, but not the distances between them, so it would look like an inflated mess. I could use a union, but that wouldn't work for my purposes...
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Honestly, i dont know, i been asking myself the same for a really long time too