So whenever I use one of my abilities and it touches another object then it rises to that objects top then continues. How would I fix that?
http://gyazo.com/1220c06fc54ab3957fafb5bfa83340d2
EDIT VERSION
local cframe=CFrame.new(0,0,0) function expand(Part) for i = 1, 20 do cframe=Part.CFrame Part.Size = Part.Size + Vector3.new(0,0,4) Part.CFrame = cframe * CFrame.new(0,0,-2) --this line was edited wait() end for i = 20, 1, -1 do cframe=Part.CFrame Part.Size = Part.Size - Vector3.new(0,0, 4) Part.CFrame = cframe * CFrame.new(0,0,2) wait() end print("Part Done") Part:remove() end
plasma that isn't how I made this. I will show you here (A snippet code)
function expand(Part) for i = 1, 20 do Part.Size = Part.Size + Vector3.new(0,0,4) Part.CFrame = Part.CFrame * CFrame.new(0,0,-2) wait() end for i = 20, 1, -1 do Part.Size = Part.Size - Vector3.new(0,0, 4) Part.CFrame = Part.CFrame * CFrame.new(0,0,2) wait() end print("Part Done") Part:remove() end