How would you tackle this issue on melee combat script?

Ok so I currently have a way of scripting melee combat but im having doubt on how efficient and reliable this is. Basically it’s a system with blocking, dashing, and attacking. Every time the player wants to do any of these actions it checks on the server if it meets certain criteria’s through a remote function and it does everything it needs to do on the server while also sending the OK signal for animation to play on the client.
The reason why it is set up this way was because I wasn’t able to think of a way to make it reliable if I let the client do the criteria checks so I had to sacrifice fast input latency for security. I honestly don’t like the delay but I don’t know how else I can make it less delayed if I have to do checks in the server before blocking, attacking, and dashing. (When blocking you can’t attack or dash) (when attacking you can’t block) (when dashing you can’t block). It’s just a tricky situation for me, I feel like if someone more competent than me can help me out it will really help a lot on how i see client to server communication and vise versa.


perhaps you could show us the script so we can see what needs to be changed.

I already explained what the process is like, there’s no unnecessary waits or anything like that. Its all straight forward, the only problem is the time data gets sent to the server and back, I just need someone with a better Idea to explain how they would tackle this so there would be less delay on the initial activation.

1 Like

I do understand that but without the script we have nothing to chat about other than ideas.
If that is what you want then scripting support is not the correct location for your post.

No… this is the right section. I just want to know how someone else would tackle this, if you can’t understand what im doing/saying this post isn’t for you, sorry.

If you still want to keep the security, you can play () and stop () the animation on the server this will be a bit faster.

I understand but the initial input delay would still be there for doing all the checks in a remote function before playing the animation