I am making a combat game, I did a lot of trial and error in making my combat system it worked but I feel like there's a little input lag or input delay on M1s. Is there any way to play the animation on client and let the server handle the combos, cooldowns and hitbox? bcs in my case, i let the server handle the animation too and everything which i think causes the input delay/lag
#pls help, I am a newbie in scripting
1 messages · Page 1 of 1 (latest)
Anims played on server side shouldnt have a delay, are you sure it isnt a studio bug? try testing it in the place
Its jus a small delay but i feel like it should be more responsive. I am afraid that it would feel clunky when the players test it out, also wdym by testing it in the place? Like in the actual roblox game, outside the studio? Ty btw
Yea, test it in roblox and see if the delay is still there.
If it is try loading and playing the anim directly after all the checks.
Animations are better loaded on client
You’re sending a message to the server to animate you then it has to send it back to say yeah move like this
Isnt that like firing remotes to the server then firing to the client after? im a little bit confused
Lol
I know it's not the issue here BUT, try not to use LoadAnimation() every time a remote event is fired, I would preload all animations into a table using the keys {[Player]: AnimationTrack} and make it a global value using _G.Table = {}.
What you are doing here, is every time you attack you load a new animation while the previous ones are still there, over time this will cause tons of issues (and loading the animation takes time and could be the source of the lag)
EDIT: I took a second look, looks like you already have a table that you store the tracks in, preload the animations into that table instead of loading them each time. Load every animation at the start of runtime.
@old belfry 😄
No
Global variables suck
Use a module instead
i got you fam