#Teleport player to different location after spawning

1 messages · Page 1 of 1 (latest)

lethal scaffold
#

Sounds like you have client based movement. In that case you would need to use OnNetworkSpawn() to move from the client side or send a client RPC from the server with the correct spawnpoint

barren osprey
#

Something like this?

    {
        transform.position = new Vector3(0, 10, 0);
    }
lethal scaffold
barren osprey
#

I have this now but it still only works once every like 10 times

    {
        if(!IsOwner && OwnerClientId != 1) return;
        transform.position = new Vector3(0, 10, 0);
    }
#

I specifically want client1 to go somewhere else

lethal scaffold
#

that will work. You can also cycle through spawnpoints if you have more than 2 players

barren osprey
#

Well the thing is, it doesn’t work :/

lethal scaffold
#

Try with IsLocalPlayer instead. IsOwner might actually take a frame to be set correctly after spawning

barren osprey
#

That seems to be working! Many thanks

barren osprey
#

Apparently I didn't test it enough; the client still gets teleported back 😭

#

I took a break after the fix and I've just come back to see it not working. Didn't change a thing