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

Having an odd teleportation error?

Asked by 6 years ago

No matter what Place ID I put in this script, the error is that it cannot find the game, (Yes I made sure they're in the same game Universe). Doesn't make sense to me.

local event = game.ReplicatedStorage:WaitForChild("TeleportTutorial")

local function onFired(player)


    game:GetService("TeleportService"):Teleport(1432182797, game.Players.LocalPlayer, {}, game.ReplicatedStorage.TeleLoading)

end


event.OnServerEvent:Connect(onFired)



18:23:24.566 - Teleport exception: HTTP 400 (HTTP/1.1 400 Bad Request) 18:23:24.579 - raiseTeleportInitFailedEvent: Teleport failed because Cannot find game server (GameNotFound)

0
You can't use game.Players.LocalPlayer in a ServerScript, and you don't need to. Just use your already defined `player` you get from the remote event. theCJarmy7 1293 — 6y
0
I already tried that, the problem is that it won't teleport because it can't "find" the game for some odd reason, it still doesn't work, local script or not greybird700 63 — 6y

2 answers

Log in to vote
0
Answered by
Nonaz_jr 439 Moderation Voter
6 years ago

its because you are in studio. upload and publish and try it, it looks like it should work.

0
False greybird700 63 — 6y
0
I hate how true and false are capitalized in python. theCJarmy7 1293 — 6y
0
That's strange, it works for me. Try this in a local script: Nonaz_jr 439 — 6y
0
game:GetService("TeleportService"):Teleport(1537690962, game.Players.LocalPlayer, {}, game.ReplicatedStorage.TeleLoading) Nonaz_jr 439 — 6y
View all comments (3 more)
0
Also, how do you get the error, because when I use your place ID (which is in a diff universe) I don't get this particular error either (it just teleports to a seemingly empty place and hangs there, saying wrong universe). Is any teleport initiated at all for you? Also, are both places published (i guess so).. Sorry, only found a 2year old bug report describing similar issue but no solution Nonaz_jr 439 — 6y
0
That bug report does mention however: "I set the place I've been trying to teleport to as the start place of the game, and now the game will not load at all. It says "Requesting Server" infinitely." This suggests maybe something is wrong with the place you want to TP to. Perhaps just a connection issue, but maybe something went wrong uploading? Nonaz_jr 439 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Make the game its sending to active. If thats not problem, remove:

{}, game.ReplicatedStorage.TeleLoading

Thats in the code block below:

game:GetService("TeleportService"):Teleport(1432182797, game.Players.LocalPlayer, {}, game.ReplicatedStorage.TeleLoading)

Also make sure the code is in a ordinary script, not a local or module script.

0
Not the problem greybird700 63 — 6y
0
I've tried it with just game:GetService("TeleportService"):Teleport(1432182797) greybird700 63 — 6y

Answer this question