I'm needing help with an effective means of CFrame animations. Current animation scripts I've made have looked something like this:
part = script.Parent part.CFrame = CFrame.new(0,0,0) wait(0.1) part.CFrame = CFrame.new(0,0.1,0) wait(0.1) end
and continuing on like that until a certain point in which it stops. It also ends up being a really bad animation, ending up looking as though it's teleporting in very small steps.
Any help is much appreciated.
~kl4331
Any time you are going to be repeating an action, use a loop.
local part = script.Parent for i = 1, 100,.01 do --Read about how this works at the loop link part.CFrame = CFrame.new(0, i, 0) wait() end
Unfortunately, there are no easy ways to do non-linear animations (all require math). Hah! Just kidding! We can just get a module to do that stuff for us!