In your case, you’re trying to rotate it 45 degrees than 90 degrees than 90 again.
rButterfly.CFrame *= CFrame.Angles(0, math.rad(45), 0) --Initally starts it at the first rotate point.
while wait() do
for i=1, 90 do
rButterfly.CFrame *= CFrame.Angles(0, math.rad(1), 0) --Rotates the Butterfly wing
end
for i=1, 90 do
rButterfly.CFrame *= CFrame.Angles(0, math.rad(-1), 0) --Rotates the Butterfly wing the OTHER way
end
end
rButterfly.CFrame *= CFrame.Angles(0, math.rad(45), 0) --Initally starts it at the first rotate point.
while wait() do
for i=1, 90 do
rButterfly.CFrame *= CFrame.Angles(0, math.rad(1), 0) --Rotates the Butterfly wing
wait()
end
task.wait(0.25)
for i=1, 90 do
rButterfly.CFrame *= CFrame.Angles(0, math.rad(-1), 0) --Rotates the Butterfly wing the OTHER way
wait()
end
end
I added wait() in each for loop so it does not run instantly on each run through.