How to multiplayer?

I created a teleport function and tried it with a dedicated server, but it does not work. I have replicated the variables.
Can you please help me.
Picture of script: