Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Teleport Service Crashes People?

local TeleportService = game:GetService("TeleportService")

 
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        TeleportService:Teleport(54739220, player)
    end
end
 
script.Parent.Touched:connect(onTouched)

Whenever I touch the brick, it's in the process of teleporting, then it stops responding and I crash.

9 comments

0

Try :TeleportToSpawnByName(placeid, "SpawnLocation", player) Replace SpawnLocation with another name if you want the player to spawn onto a specific spawn

0

I have no clue for the crash instead.

0

This is often a problem with the client (AKA, you). It will fix itself eventually, I believe. It has happened to me before, in different games.

0

I want to teleport to another game, not a spawn location @maquilage

0

I am having the same exact issue. When i check it out in studio it shows me this in the output. https://gyazo.com/53fb23dffdea62f6444f3fd607a43584

0

It teleports to the game and the spawn location IN the other game

0

How would I know the name? I'm using this for a rally place for a war clan.

0

The spawn location part is optional and has no effect on the teleporting part of it. TeleportService makes your client go unresponsive sometimes for some reasons. I blame roblox and their wonky rushed untested updates.

0

bump

1 answer

✓ Accepted answer

The script you posted worked fine for me. I would like to point out that ROBLOX has some issues with their TeleportService and Games(such as reserving a server and teleporting players to places within the game).

1 comment

0

Ah, thank you very much

This discussion is preserved as it was. New answers, comments, and votes are closed.