Today I was creating some quirks for my upcoming game and I realized that I was having some problems. Basically I was creating an energy ball/ki script and I realized that the energy ball was spawning in front of my hand instead on it. I thought I had done something wrong in my script but nope. And not only that but the ball froze for like 1 second in my hand and then it started moving. It was a really huge delay. Then I decided to transfer network ownership to the client through :SetNetworkOwner() as I thought that might make a difference, and it did! (ignore the head) https://gyazo.com/2847b44c8e6c1c5cdea29673d5885e9c
I feared that using :SetNetwork(player) would cause lag for the other clients and the quirk would look really bad. And I was right. The quirk looked awful for the other clients. The energy ball froze on the hand for some seconds and then decided to move extremely fast in a glitchy way. I have been trying pretty much everything to fix this problem but I am not sure what I am doing wrong. Script inside server script:
That’s really the only way to have viable server-client communication while giving the client instant feedback when they shoot. It’s what almost every top game you see that requires real time action does.
Yeah but that method seems a little bit over the top. I will see if there are better alternatives and try all of them and see which one of them is the best.
You were right! It is working like a charm . But wouldn’t exploiters be able to easily steal my code now? Also isn’t this too much work to do considering I wouldn’t just want to fire energy balls out of my hand but also add abilities to the energy ball such as explosions, kill the player who touches the ball etc…
Exploiters can steal anything that’s replicated or visible to them. Why worry about that? Would you rather botch your codebase and worry about a couple of scumbags who get a kick out of putting others down, or would you rather focus on getting your game out and allowing your audience to enjoy a smooth, lasting and enjoyable experience?
The merit far outweighs the risk. I’d say do it anyway, despite this acknowledgement. There are just some things you can’t avoid and that you have to grit your teeth over. The reward is more satisfying than trying to fight off a few hundred or more exploiters.
Yeah you are right, I agree with you. Even if they steal my code that is fine, it is not like they will steal my whole game, just the abilities and I am fine with that.
Actually it appears that I am still having lag issues . https://gyazo.com/afe52ae99b45470b2dc8c38e72235190
It gets worse by the way. I followed your method. The feeling of lag is indeed gone but there is still latency.