Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to resize a part with scripts like stuido resize?

So I want to resize a part using a script, but I don't want the part to move up. When you resize a part with the normal script it will scale it up on all axis.

https://gyazo.com/d7ec17771b8672753fc0dcf861491ea1

^ This is how I want to scale the part using a script. ^

local Part = script.Parent

-- Part size is 2,2,2

Part.Size = Vector3.new(3,3,3)

3 comments

0

From your script the part will basically not changing the position i have tried it in the studio

0

uhh Thats not what I need

0

Then what on earth do you need!!?!?!?!

2 answers

✓ Accepted answer

You were on a good start! The only thing that you needed was the distance. You can move it by adding divided by 2 the position to devided by 2 the amoute of size you want to add. So your script would look like

local part = script.Parent --part
--part was 2,2,2
part.Size = Vector3.new(3,3,3) --we add 1
part.CFrame = part.CFrame+Vector3.new(0,-.5,0) --1 devided by 2= 0.5 This is sensitive to rotation.

1 comment

0

If you want it to be smooth please contact me thru discord.

Only change the sizes you want to change?

local part = script.Parent

-- Part size is 2, 2, 2

part.Size = Vector3.new(3, 2, 3)

moving up is probably the Y so don't change the Y

2 comments

0

uhh Thats not what I need

0

Do you want it to slowly change size? You did say that you didn't want it to scale on every axis.

This discussion is preserved as it was. New answers, comments, and votes are closed.