Hello. I have a attack centered game, and I’m having a problem with remote events. Here’s a video to explain:
As you can see, there is extreme lag in the attack. How do I prevent that? When you click, a script sends a request to the server, then that script fires a specific bindable event to a separate script devoted
to that attack. Is that a good way to script it? Will that cause lag?
Weird, the video isn’t playing correctly… I’ll just explain it, when I use the attack, the shard doesn’t start on me, it starts behind me, I’m assuming that’s because that where the server THINKS I am, but if so, how do I decrease the lag?
Hmm. Are you sure its about lag? Try checking where its created. Also, if that isn’t the case, maybe you can try setting the shard part to the client to handle so theres little to no lag. Use :SetNetworkOwnership() to the player. I don’t know much about this network ownership stuff but you get the idea lol. If you want to learn more about this and how to actually set it on the players client, click Network Ownership | Roblox Creator Documentation
I won’t set the ownership to the player because that would make it easily exploitable. My principles are security > performance, not the other way around.
Then I would say try checking your part in your script that creates the shard and sets its position. It is very unusual for the shard to start way back or a little back unless its messed with the script.
Weird, it’s still occuring. I’m simply setting the position of the shard to the position of the humanoidrootpart. If that’s where the serverscript thinks the player is, what am I supposed to do about that?