How to make objects stick and unstick?


I’m looking for a way to make objects like two cubes stick together, and then come apart when a certian amount of force is applied, like physics you see in Roblox. Could this be done with breaking constraints, or something else? I tried to look for tutorials but coulnt find any. :confused: