#Are all the players who spawn in accessing the same movement script

1 messages · Page 1 of 1 (latest)

broken belfry
#

Each player has its own copy of the script. But you'll still need to check that only the local player is accepting input.

red swift
#

but if they all have their own copy of the script, how could a different player be accessing input? is it because all the update functions are complied in the same space or something?

broken belfry
#

all the players are in the scene. if they are all listening for input, then they will all move when the player presses a key

red swift
#

ah, so input from any client is outputted to the entire scene?

broken belfry
#

yep

red swift
#

kk ty

red swift
#

This is my understanding so far: in the eyes of a client, you have your scene, which includes your own player. When you input, that input is given to the entire scene. This is an issue because you could unintentionally update another player's position, which, upon the server updating everyone's data, would update someone else's position.

#

is that correct or no?

broken belfry
#

Right. Whenever you check for input, you will need to check for isOwner or isLocalPlayer. Or just disable you input script for remote players.