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

[SOLVED] Roblox Teleporting seems to stall indefinitely?

Asked by 3 years ago
Edited by JesseSong 3 years ago

I'm currently working on a teleportation system for my game, and what I'm doing is when the player teleports, it sends a model over to the game(which is supposed to be a place), which the game will then use for whatever.

Currently, when I teleport, the teleport seems to just never finish, it will initially say "Third party teleport protection was unable to confirm safety of teleportation place" as a warning on the client side, but then, no matter how long I wait, every time I try and teleport again, it says that a previous teleportation is "in process", and I never actually teleport to the given place.

There are no other errors or warnings. Everything is in the right place in the Explorer and everything goes to the right place when the game runs.

The place that is being teleported to has no edits at all other than me making it more "default", if you will.

Here are my scripts.

Server (inside ServerScriptService):

local tpService = game:GetService("TeleportService")

game.ReplicatedStorage.StartClient.OnServerEvent:Connect(function(plr, PlaceID)
    if not game.ServerStorage.Servers:FindFirstChild(tostring(PlaceID)) then
        local server = tpService:ReserveServer(7203749700)
        print(server)
        print(type(server))
        wait(0.5)
        tpService:TeleportToPrivateServer(PlaceID, server, {plr}, "spawn", game.ServerStorage.Places:FindFirstChild(tostring(PlaceID)))
        local value = Instance.new("StringValue") -- this whole bit is for when more players come and join
        value.Value = server
        value.Name = tostring(PlaceID)
        value.Parent = game.ServerStorage.Servers
    else
        tpService:TeleportToPrivateServer(PlaceID, game.ServerStorage.Servers[tostring(PlaceID)].Value, {plr}, "spawn", game.ServerStorage.Places:FindFirstChild(tostring(PlaceID)))
    end
end)

Client (inside a TextButton which displays on the screen)

script.Parent.Activated:Connect(function()
    game.ReplicatedStorage.StartClient:FireServer(1) --  this is a "custom" place ID I have even though it's just a model
end)

Please help!

0
use print statements, and tell me where it gets up to JesseSong 3916 — 3y
0
it goes through the entire script, every print function runs FirewolfYT_751 223 — 3y
0
did you publish the game? if not try publishing it. that may fix your issue JesseSong 3916 — 3y
0
also change reserveserver the numbers in reserve server to game.PlaceId JesseSong 3916 — 3y
View all comments (4 more)
0
like this: local server = tpService:ReserveServer(game.PlaceId) JesseSong 3916 — 3y
0
lmk if it works or not JesseSong 3916 — 3y
0
ohh wait, i think i know the issue. i should be using "7203749700" instead of "PlaceID" in the teleport system FirewolfYT_751 223 — 3y
0
yup that was it FirewolfYT_751 223 — 3y

Answer this question