How can i push to an object to a wall or a surface in front of me while holding. Like gravity gun using mouse wheel to change its distance ?

Couple of things:

  1. Have you got physics enabled on the cube?

  2. Because you have this on tick, it’s trying to reposition every frame. It might be an idea, for testing, to just call it when you click the mouse and wait to see where it’s going.