Hello, I needed to know how can I script it so that a moving NPC can be shown at the same place on all clients but not on the server. I was thinking in terms of a module script I can use for multiple scripts but I’m not sure thanks for any help.
I’m quite not understand what you want. But, I think what you want to do is to move a character using :Move()
method on the character humanoid for all clients but not on the server right?
I don’t think that would work because of some players latency right?
Seems extremely redundant, whats wrong with doing this on the server?
I’ve noticed it adds a lot of lag on the server, and ive also seen videos saying not to do lots of things on the server.
Then your code is unoptimized and inefficient. The server is the best use case here
Yes. But, there is a way around it. You can clone the character and make the current character invisible then move the cloned character by using :Move()
method on the cloned character humanoid to move the cloned character.
How come? Why is the server the best use case here?
Im trying to do a similar thing, and I was going to do it on the client as well. The server doesnt need to load the character models, so why? Is updating the movement from the server and sending it to the clients the best course of action?
Would an UnreliableRemoteEvent be the best use case here?
Both Lewis & Suphi have examples of massive amounts of serverside NPCs in example places. I use an modified version of Lewis’ “Justice” implementation and just do animations clientside and can easily run with 50+ NPCs with no lag. Admittedly, they are all set to non-collide in the same CollissionGroup but it works extremely well.
Do you have a link to Lewis’ NPC system along with documentation? I would like to see it for myself.
Thank you.
This is hostile behavior; if you’re not going to be helpful even while being condescending, and instead just condescending, then no point in posting.
Anyways, there is a very valid argument to his response and his question.
Simulating Animations on the server is bad practice and will induce lag.
Simulating Humanoids on the server can be bad, and may induce lag in high numbers.
It’s smarter, and better practice, to use a holder, such as a Part, for the positions of very large amounts of NPCs, and simulate their models, animations, and similar visual elements, on the Client.
In my case I do need 50+ NPC’s could you give me a link to the Lewis “Justice” system you used. Suphi’s tutorials don’t help me much but I’ve never heard of Lewis.
Try to sync the time between server and client.
You can find it here:
There are a number of versions of it in there. I did try to migrate a game to v6 recently but experienced problems in customising it (my fault) so currently run a blend of v5 & v6
Are there versions that are already made? I’m not a very good scripter and I’m not sure I can modify this system.
What is your “use case” for this? How do you want the NPCs to operate? I have a few different example test places developed from both Suphi’s and Lewis’ versions. I could upload a few versions for you to have a play with.
It’s a wave based game where there going to be multiple types of enemies, so some behave differently like not chasing the closest person but actually targeting the farthest person.