This is probably related to Z-Fighting with transparent textures. I can’t really explain much as it would be too long, but an oversimplification of this is: closer textures get rendered on top of farther textures based on the distance of the camera to each texture.
This isn’t Script-related, this is just how Roblox (and other games and software) handle transparent textures.
For the lag though, there must be a problem with the Script, probably. You might be doing something seemingly lightweight until it isn’t when placed in a heavy loop. We wouldn’t know what actually causes the lag until you post your code (if it really is code-related).