Whenever i execute this script it would always say "0 is not a member of folder" in the output.
if CurrentItem > 4 then CurrentItem = 1 end
If CurrentItem variable is a value, then try to do:
if CurrentItem.Value > 4 then CurrentItem.Value = 1 end
but if it's something else than a value, you should find a variable or an IntValue assigned to the CurrentItem var. and do CurrentItem.IntValue.Value instead of CurrentItem.Value in the code up there.