Should Npc movement be done on the cilent?

Hi, I am doing a cutscene and I don’t know if I should do it on the client or server.

One issue I thought of was that if 2 players reach a check point at different times and the cutscene plays, that’s not going to work.

also I think it will cause lag, because all players will have animations running even though they didn’t trigger it.

BUT one problem I don’t exactly know how to do it from the client.

so some examples and explanation would be very much appreciated, as my scripting is quite limited.

You could use a mix of both, the server picks up that a player has hit the trigger and fires a remote event to the client that touched it to play a cutscene.

1 Like

So the client can not detect if a player touches a brick?

No as LocalScripts cannot run in bricks.

1 Like

I see, so can I use default run animations on the client or is that only server sided?

Yeah, you can play animations only on the client. Just put the script in StarterCharacterScripts.
image

1 Like

alright, that’s all the questions I have, sorry if all of my questions sound basic to you, it’s just I don’t have much experience with the client.

Is there a forum post explaining the things you could do and can’t on the cilent?

Read this:

1 Like

I was reading that and this confused me, If a client calls AnimationTrack:Play() or AnimationTrack:Stop() on an AnimationTrack , the animating model will animate on the client and replicate to the server.

Another question can you tween the camera on the client?

Yes, they are an exception. They are replicated to both.

1 Like

Ok Thank you, I will bump this if I have anymore questions.

1 Like