Hi Beeka,
Welcome to our community! 
Did you check the position of the player in the Inspector? And did you log the xRange value into your console to see if there is a difference between the values in your console and the position in the Inspector?
See also:
- Forum User Guides : How to apply code formatting within your post
- Forum User Guides : How to mark a topic as solved