Enable SpawnLocation only for teleportation

Hello!

As you may know, there is a function of TeleportService that is named TeleportToSpawnByName.

My problem is: I need to teleport to a spawn, but I need that spawn to not work without being teleported by TeleportToSpawnByName.

How can I do that?

Thanks in advance,
Mehdi

No promises, but setting the Enabled property on the spawn location to false might work.

Tests were ran to check if the execution of yo… got through the 30 limit? good.
Didn’t work.

Not sure why “TeleportToSpawnByName” wouldn’t work with a spawn being disabled.

If you really need to spawn at a specific location try sending data with teleporting the player. To read teleport data use TeleportService:GetLocalPlayerTeleportData

Hi! I already use TeleportData in one of my other creations, but I’ve got a really near deadline and much work to do so I needed a quick solution. Look at the post I just added for how I “fixed” this problem.

1 Like

In the end, I ended up using TeleportToSpawnByName for all my teleports and teleporting to the default spawn. Thanks everyone for trying.