Update Perspective.lua

Move local declaration outside of loop