#Organizing code: make all movement-related stuff in one LocalScript or multiple?

1 messages · Page 1 of 1 (latest)

hidden nest
#

Hi, I'm currently coding for fun as I explore the studio bit by bit, and I was wondering if mechanics such as dashing, running, alongside the stamina system should all be handled in a single LocalScript or multiple ones. The reason I'm asking this is simple: I need a LOT of tweens for different purposes, such as changing the camera's FOV, running acceleration, UI animations, and so on; but at the same time I don't feel the need to have a separate script for every action my character performs (I'd not say "action", but you get what I mean).

Any tips on how to approach this? I'd appreciate any similar experiences or explanations shared here, thank you

fallen pike
#

thought i think u can benefit from multiple ones

hidden nest
#

I thought of attributes which might be useful for script communication

hidden nest
#

and thanks oatmeal

fallen pike
hidden nest
#

earlier today I ended up creating a get-set property to retrieve the current stamina attribute and update it, but it's so spaghetti code

#

💔