#I have some questions about optimizing my scripts.

1 messages · Page 1 of 1 (latest)

timber badge
#

I'm making a basic move set systems that check the player's "Ability" attribute and then run the script. The picture is the client, server, and the module side's scripts. This is how it works: The client accepts input (Holdable) and fire the player's ability, input, and mouse position to server side,. Then, the server side checks the player's ability, runs the module for it, and check the input.

#

So my question is
Are there any way to make this more compacted and organized? And of course a better way to send information via client -> server -> module if it exists

#

The module is unfinished of course

#

And yes I could change to use normal multiple Local script if this is too complicated

trim oracle
#

i would maybe rearrange it a bit, which could optimize the data youre sending and make it a little cleaner

#

like for the module i would probably use a table, and it would look something like this:

module.Abilities = {
["Ability1] = {
["Begin"] = function() end),
["Hold"] = function() end,
["End"] = function() end,
},
}
#

thats just a mild reorg but it would allow you to have different abilities. right now youre locked in to having only 1

#

kind of just 2 different ways to do it though but say u wanted like variants on a character it would be easier to organize for example

#

as for actual optimizing i would try to avoid firing the hold remote event every wait() since that will be a lot of traffic