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

Is Resizing a Part with CFrame Possible?

Asked by 5 years ago
Edited 5 years ago

I tried looking this question up but there were no questions like this I think.

Anyways.. I wanted to know if this was even possible because I know you can move things with CFrame. I have always used Size in resizing an object. but every time it resizes it, it will move the part's position if it something is in the way. I would provide code if i knew how to do it but I have no idea what to do. Sorry! Thanks for helping out. (Side note: Not asking anyone to do this for me, i just need a wiki page or maybe a little code)

1 answer

Log in to vote
0
Answered by
thebayou 441 Moderation Voter
5 years ago

What you could do is first "cache" the part's location, then resize it, and finally move it back to where it originally was.

local part = ...

local partCFrame = part.CFrame  -- Save the part's original CFrame
part.Size = desiredSize         -- Resize the part
part.CFrame = partCFrame        -- Reset its CFrame to its original value

Now, I realize this isn't resizing a part using a CFrame exactly, but it does fix your problem of parts moving out of the way and stuff.

0
Ok i may try this but I think I have done something like this before MusicalDisplay 173 — 5y
0
Make sure the part is anchored tho thebayou 441 — 5y
0
yes MusicalDisplay 173 — 5y
Ad

Answer this question