01 | while wait() do |
02 | for i = 1 , 10 , 1 do |
03 | wait(. 5 ) |
04 | script.Parent.Size = Vector 3. new(script.Parent.Size.X,i,script.Parent.Size.Z) |
05 | script.Parent.CFrame = CFrame.new(Vector 3. new(script.Parent.Position.X,script.Parent.Position.Y+. 5 ,script.Parent.Position.Z)) |
06 | end |
07 | for i = 10 , 1 ,- 1 do |
08 | wait(. 5 ) |
09 | script.Parent.Size = Vector 3. new(script.Parent.Size.X,i,script.Parent.Size.Z) |
10 | script.Parent.CFrame = CFrame.new(Vector 3. new(script.Parent.Position.X,script.Parent.Position.Y-. 5 ,script.Parent.Position.Z)) |
11 |
12 | end |
13 | end |
Even though with CFrame, parts can go through parts, for some reason this isn't working properly.
Here is how I generally use CFrame and it works for me every time:
1 | script.Parent.CFrame = script.Parent.CFrame (+ or -) Vector 3. new(x,y,z) |
So I reccomend you try something like this:
1 | for i = 10 , 1 ,- 1 do |
2 | wait(. 5 ) |
3 | script.Parent.Size = Vector 3. new(script.Parent.Size.X,i,script.Parent.Size.Z) |
4 | script.Parent.CFrame = script.Parent.CFrame-Vector 3. new( 0 , 0.5 , 0 ) |
5 | end |