I just take down the code after my problem is solved so i can be safe... Problem solved, thank you!
Try inpairs instead of in ipairs, since that's what most dev products have, thats the only thing I see out of place, hopefully this fixes it if it doesn't then sorry.