-
What do you want to achieve? Keep it simple and clear!
I want to do a parrying system for my game. It uses the F button + the MouseOne to run the parrying animation.
-
What is the issue? Include screenshots / videos if possible!
Once they run the command on the client, it takes 1 to 2 seconds for the remote event to respond and add an IntValue inside of the Character named “Parrying” (that is the way I decided to use to make parrying). Once a different player hits them, if they found the “Parrying” IntValue inside the character then they get parried.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried changing the IntValue to a BoolValue so it only has to change its state, and have also tried making the Parrying animation serversided but that resulted in unrresponsive laggy controls.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I am trying to make it so a CLIENT immediately knows the other CLIENT is parrying. Exploiting is currently not an issue, and won’t ever be as it is mostly a game I’ll play with friends.
This is a warn(time()) on both the client who fired the event, and the event being received. There are no wait() statements delaying it, and the game runs smoothly at 80ms:
![TimeDifference](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/4X/e/8/b/e8b51d1b2916a6a817457bcb015f8174ab6e2019.png)
2 Likes
How about insteas o inserting an IntValue just add the player thats parrying to a table like so
local ParryingPlayers = {}
ParryingPlayer[player.Name] = true
1 Like
Even so, it won’t change the fact the RemoteEvent takes over 2 seconds to update it.
Remote Events usually fire in a split second. Your code probably just isn’t efficient. Could we see it, maybe we could help you make it faster.
1 Like
Could we see the client and server code?
Hard to tell whats the problem when we have no code to work with
1 Like
After tests, I made a server in game (not on studio) and by comparing warn(tick()), I have concluded it takes .5 seconds for the remote to fire.
I’ve reduced the lag to the general server lag, but still it is not perfect. Is there any way I can tell a client the other is attacking without going through the server?
If you’re looking for one client to act with another, that isn’t possible. You need the server in order to do something like that
Hello. I am reviving this topic because my attempt at making parries has improved, by using the suggestion to store parrying players into a table. I made a script, which saves such values in a table when called by a RemoteEvent. Sadly, there is still a delay between two players in the animations, as animations play kinda late for anyone else.
Is there a way to Sync Up Animations instead? From client to client?
1 Like
Just play animations server side, past me.
1 Like