It’s as the title says, I’m trying to create a sword system and wanted to use the GetMarkerReachSignal to activate a damage script for a sword system. The problem is that I start playing the animation on a local script which prevents me from using the GetMarkerReachSignal in a server script. I’ve used remote events as a way of communication between the scripts. I have been debating if I should just keep it all on a server script but found the animations to be less responsive. Is there a better way to do this? Please let me know, anything helps.
So I currently use :GetMarkerReachedSignal("doorOpened"):wait() to yield my server-side scripts until an animation reaches a certain point. It works perfectly fine on the server. In my case, I was using them on doors, so it makes sense to manage the doors on the server rather than the client, since doors are replicated to all clients anyways.
I guess the question you want to ask yourself is if your script needs to do more things on the client, or more things on the server. Things that need to be replicated to all clients should be run on the server. Things that need a degree of trust like a round countdown should be run on the server. But anything that has to do with an individual player’s UI, animations, or things that they would only be seeing should be run on the client.
But go ahead, it doesn’t hurt to run that on the server.
Thanks for the help. I just needed another’s input on the situation. I’ll definitely try to use wait to yield in the scripts although I might just run the animations on the server. Once again, thanks.