Wanting to create a Undertale-based combat system. (Soul Movement)

Hello! I’m new to the DevForum. How you guys doin’? Anyways, I’m trying to make a Undertale-like battle system but I have no clue where to start. I’ve been playing around with UserInputService for a while but just gave up in frustration. I don’t want to make it a gui, just a plain part that you can move around like a soul in Undertale. If anyone has some resources that would help me learn how to fundamentally make this, please tell me! Thank you for your time listening.

1 Like

Hey!
This post references mainly what you are looking for.

1 Like

Oh thank you, i’ll check it out tomorrow!

Welp I know I said tomorrow but it works like a charm! Thank you! (I didn’t grab the original sourced, I grabbed the one from the solution of the post for those who are also wondering on how to make this system)

Oh um, I know I marked you as the solution but um I need help with one more thing. A collider to it. Would raycasting be an option in this scenario? Or do you have any other good ideas? Regardless you did solve my mainline issue so its to u if ya wanna respond more, thanks anyhow and have a good day

If it’s a 3d part, ray casting isn’t a bad solution. If the arena is a predefined rectangle, it might be better to simply not let your part position increase/decrease past a certain range. For example, if your arena is (from a 2d perspective) (0, 0) to (100, 100), if the player is moving in a way that will make his x or y greater than 100 or less than 0, simply set it back to 100 or 0.

1 Like

Thanks for the tip! From this I learned what math.clamp could do and finally figured out how to make the barriers with it. Thank you for your help!