So I got a script that should make it where the part rotates and moves up and down with a lerp, but it seems to only rotate... I know I'm doing something wrong but what is it? I'm not very good at scripting.
Here's the script:
local part = script.Parent
local start = part.CFrame * CFrame.new(0, 0, 0)
local finish = part.CFrame * CFrame.new(0, 0.5, 0)
local rotstart = part.CFrame * CFrame.Angles(0, 0, -0.03)
local rotfinish = part.CFrame * CFrame.Angles(0, 0, 0.03)
while true do
for time = 0, 2, 0.2 do
local progress = 1 - math.cos(time * math.pi)
part.CFrame = rotstart:lerp(rotfinish, progress)
wait()
end
end
while true do
for time = 0, 2, 0.2 do
local progress = 1 - math.cos(time * math.pi)
part.CFrame = start:lerp(finish, progress)
wait()
end
end
