How to prevent my teleport script teleporting to the place i just were?
Okay so I have a serverscript in ServerScriptService and when a specific players says :update it teleports everyone to a server so the game can update but my script is teleporting to the place i just were instead it should teleport to the placeid Here is my script
01 | names = { 'Timmerman73' , 'mastergozo123' , 'thorcelli' , 'trolltracker393YT' } |
03 | game.Players.PlayerAdded:connect( function (player) |
04 | for i, v in pairs (names) do |
05 | if v = = player.Name then |
06 | player.Chatted:connect( function (chatmsg) |
07 | if chatmsg:sub( 1 , 7 ) = = ':update' then |
08 | local msg = Instance.new( 'Message' ,workspace) |
09 | msg.Text = 'S-S-F is getting an Update Teleporting' |
11 | for _, player in pairs (game.Players:GetPlayers()) do |
12 | local tpservice = game:GetService( 'TeleportService' ) |
13 | local placeid = 1501752084 |
14 | tpservice:Teleport(placeid,player) |
Help would be appreciated.