How do I resize an object correctly? The object doesn't go through other parts, instead it gets flung up.
c1 = script.Parent.Parent.c1 c2 = script.Parent.Parent.c2 function onClicked() for i = 1,30 do c1.Size = Vector3.new(c1.Size + Vector3.new(0, 0, 10.06)) c2.Size = Vector3.new(c2.Size + Vector3.new(0, 0, 10.12)) end wait(5) for i = 1,30 do c1.Size = Vector3.new(c1.Size + Vector3.new(0, 0, -10.04)) c1.Size = Vector3.new(c1.Size + Vector3.new(0, 0, -10.10)) end end script.Parent.ClickDetector.mouseClick:connect(onClicked)
First o all, make sure the Parts have the property: "CanCollide" enabled, and then just use the "Resize()" function.
For example:
c1:Resize(Enum.NormalId.Bottom,- 10.04) -- You Can change "Bottom" to whatever side you're changing