Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why do I get an error when I try teleporting a player with this script?

Asked by
Uluomis 32
5 years ago

So I asked a question a few days ago about Teleporting other players to private servers and got an answer that seemed to work. When I was testing the script that made it so it teleports you to the same place as the player was currently in. It worked and then when I tried to make the script teleport you to a different place I got an error with the code 769. I don't know if its the game or the script so please help.

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetGlobalDataStore()
local ClickDetector = script.Parent

-- Get the saved code
local code = DS:GetAsync("ReservedServer")
if type(code) ~= "string" then -- None saved, create one
    code = TS:ReserveServer(game.PlaceId)
    DS:SetAsync("ReservedServer",code)
end

ClickDetector.MouseClick:Connect(function(plr)
    TS:TeleportToPrivateServer(3926134089,code,{plr})
 end)
0
Whats the error SimplifiedCode 227 — 5y
0
it just says teleport failed Uluomis 32 — 5y
0
It should be attached to your starter place in a single game greatneil80 2647 — 5y
0
wat Uluomis 32 — 5y
View all comments (2 more)
0
Is this place: 3926134089 in a different game than the one you are teleporting from? SerpentineKing 3885 — 5y
0
No Uluomis 32 — 5y

Answer this question