I am trying to use inverse kinematics but for the bone would not bend in the right direction so i tried rolling it but the it deformed the foot and leg of the mesh how do i fix this?
There are couple of problems in your file.
First the IK bones needs to have the deform property disabled as shown below:
Second, you need to adjust the pose position to be your rest pose to avoid bad bone roll values. To do this, switch to pose mode select the whole armature bones by pressing A then hit the space bar and write
Apply Pose as Rest Pose as shown below:
Last thing is parenting your mesh to your armature. To do this, go to object mode, select your mesh first, then select your armature with right-click, then hit ctrl+P and choose
With Automatic Weight and that's it, the mesh will be nicely deformed and parented to the armature as shown below: