Fixed. A few notes are inside but quick notes. I will list the main problems. -First you put raylength(CentreX+RayX) and the same for y and z. This is incorrect, it should be centreX+(Raylength*Rayx) and the same for y,z -Next, your lighting is weird... it seems to put everything black -Also, for your textures you seem to assume it is a raytracer, just use X,Y and Z instead of RayX*SDE it is easier -Lastly, I put a simpler plane script to make it easier