Changing Transform? Doesn't work with two people online?


My name is Mike and I've been facing a problem that I haven't been able to fix for a while. I'm in the middle of making a multi-player trivia game. There is a level of ten questions each with 4 answers. Only one of the answers allows you to move to the next question while the other three send you back to the beginning. Here's the problem. When two people are online and one player goes through the wrong door, it doesn't send them back to the beginning. On the other player's screen, it appears the other person goes back to the beginning and then back to their original location.

I have a script that can tell when the player has collided with a wrong answer and then it sends a message to the player saying to teleport back to the beginning. I think the problem is since there are two people with the same script on them, it sends a message to both of them to teleport back to the beginning, but it doesn't do it because it gets confused about their being two of them. That's what I think went wrong, but I don't know how to fix it.

Thanks in advance,


  • I fear, right now the problem is a bit vague for us, so I would like to send you to the Marco Polo Tutorial for general help with PUN. You should focus on the info how we instantiate a prefab per player and how they take control. It might be related to your problem, as your character seems to be overruled by some position info which you don't expect. ... marco-polo

    Do you mind if I delete the other topic?
  • Yeah you can delete it, but that still doesn't answer my question. What should I do to make it more clear? I REALLY need this info within three or four hours. Please research, I have to have this done for school by tommorow. Thanks in advance
  • Ups. The difference in time zones probably means you ran out of time? I am sorry. It was time to go home here before you even posted again.
    It's really hard to debug stuff like this without having the full project AND having the time to understand it. Unless the description fits to something known.
    The issue you have is in the category: Something's wrong with the way you update your clients. A lot can go wrong.

    If each client instantiates a character GO with a PhotonView on it, then each client has control of one such character. You can move it around and the other's remote version of that character will be updated automatically.
    If you detect a bad answer, the local machine that controls the character can simply execute a reaction and move the character.
    RPCs will only call methods on the GameObject that the RPC was called on (by using the PhotonView). It won't affect other characters.

    To debug this, you will have to identify the methods that move the characters. Then you can probably add a log entry in them and check their call-stack in the log. In best case you learn which method is the origin of moving the character and can avoid that.