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

How would I fix this problem with parts rising when hitting something?

Asked by 8 years ago

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

2 answers

Log in to vote
0
Answered by 8 years ago

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
Ad
Log in to vote
0
Answered by 8 years ago

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

Answer this question