I'm planning to make a GUI-based game, but I have little experience with arithmetics when it comes to the Vector and UDim sets.
I want to be able to have a player-controllable frame (already handled) that cannot escape the borders of it's parent container, specifically, another frame. The issue is that I don't know how to go about this. I attempted to use the AbsolutePosition values of the parent container, and it worked on the positive scale, but not the negative. Yes, once the frame reaches the left side of the parent container's border, the AbsolutePosition.X value equates to the parent container's. But, if it were to head towards the right or bottom of the container, that is when the issue occurs. Setting the value to negative doesn't help, as it doesn't reach the right side of the border. Does anybody know how to go about doing this? If so, please share your information to the public!
Too long; didn't read: Read the title.