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

TeleportToSpawnByName, but disabling spawning at that spawn?

Asked by 5 years ago
Edited 5 years ago

local TeleportService = game:GetService("TeleportService") local ID = 1 local spawnName = "abc" function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:TeleportToSpawnByName(ID, spawnName, player) player.Character.Torso.Anchored = true end end script.Parent.Touched:connect(onTouched)

Any way of using TeleportToSpawnByName and setting up a spawn for that server, but making it so people can't spawn at that particular spawn. Say for instance I have a lobby game with multiple teleports to other servers. Server A leads me to a island and when I jump off it teleports me to a spawn in the sky above the lobby game. I want it to spawn me at the correct spawns, near the front of the lobby, and not having me spawn in the sky when I join.

Answer this question