I’m currently making a movement system that will involve things like sliding, mantling, sprinting etc.
Should i use 1 local script to hold the whole system or should i make it multiple different scripts?
You can do both, start with single script for prototyping and ease of editing and accessing variables then reorganize it into multiple if the script gets too long and hard to edit.
i was just wondering because I’ve been working with multiple scripts so far, 1 for sliding, and one for sprinting, and its hard to cancel out 1 or the other when there seperate.
The first thing I like to do when working on larger systems or frameworking is writing down exactly what I want to make, what features it will have and methods I could use to make it. I also like looking for something shared between all aspects of the system and in your case it would probably be something to control the velocity acting on a player. I do this so I don’t repeat the same functions and methods over and over across various scripts and I can instead use a module. As for splitting up the different functions of your system I think @dthecoolest summarized it the best, when prototyping keep everything easily accessible, and then when you’re ready to actually build your system split them up.
Edit: I use modules for most things I work on, I only use local scripts for detecting inputs, and server scripts for processing them. But, because you are working on a movement system you can rely on local scripts to make the movement as responsive as possible.
thanks for your techniques, I will be splitting up the functions and everything to keep it as readable as possible.