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

game teleport not working completely?

Asked by 9 years ago

So, I am making this game, it has two actual maps, and one lobby. To start, you go in the lobby, and wait two minutes until all the players in the lobby are teleported to another place. That teleport works wonderfully well. The part that doesn't work is the test teleport i have set up for me to test my other map because they are all separate places in one game universe. I do not understand it, because it says, "Teleport failed. Insufficient privileges or place does not exist." When it is my OWN place, and I know it exists, it is inactive, but technically, like the other map, it is active in the game universe thing. I don't understand why. Can anyone please help? for some reason, but it may not be needed. (btw, the game is to big to run both server and client. This is not the first time, the other map only loads to 30%, this one loads to 50% then they both stop and crash.)

plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
    game:GetService("TeleportService"):Teleport(170767765, plr)
    print ("teleported")
end)

I don't see the need, as it is basic teleportation on click code.

1 answer

Log in to vote
0
Answered by 9 years ago

EDIT -here's what I would do for a button that someone would touch to teleport to the place.

function onTouched()
    local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
    if plr then
    game:GetService("TeleportService"):Teleport(170767765, plr)
    end
end

This script would go inside of the part you would want people to touch.

First: Can you post the Teleporting script?

Second: Can you not just go into studio and under the "Test" tab and test it that way?

0
Okay, I will when I can, and no, I was testing the teleport button, and the game is to big to run solo. rollercoaster57 65 — 9y
0
there, edited with the code. rollercoaster57 65 — 9y
0
there you go! If you need anything else let me know! areiydenfan00 115 — 9y
Ad

Answer this question