So I am trying to make a short animation that loops. To make it as compact as I could, I devised a system. The value it creates, though, will not change when required to. It will stay at 1 frame and keep at that frame. Thank you for any help.
while true do
for i = 1,22 do
Num = 1
CurrentFrame = script.Parent.Parent.Frames:FindFirstChild("Frame" .. Num)
script.Parent.Image = CurrentFrame.Texture
print("Frame == " .. Num )
wait(0.08)
if Num == 22 then
Num = 1
else
Num = Num +1
end
end
end
The first frame will appear, and in the output it keeps on saying that it is on frame 1. The script does set the image, so I know that part is correct.

2 comments
Now I feel so stupid! XD I always do the simplest of mistakes.
Well, we're all human! If I helped, thank me by accepting the answer!