The player is not spawning in the correct spawn location, EX. respawn location is set to spawn location 1 but I spawn at spawn location 2. I have a print statement that shows where the player should respawn, print("Respawn location set to:", player.RespawnLocation.Name, "for", player.Name)
This code actually works and prints “Respawn location set to: Lvl 1 Spawn Location for EffBeeCee” but when I reset my character I just end up respawning at a random spawn location under team 1.
what i would do is create invisible parts that you want people to spawn at, and add a black box underneath your map where unspawned players are held
after that teleport the players in the black box depending on what spawn they’re tied to
i dont really know what your game is about but you could create a string or int value stored in the player which determines which spawn they’re currently supposed to spawn at
The game is an obby and my respawn point is already a working system. I should be spawning at all the correct points but roblox is overriding my script and just spawning me at a random spawn location, not the set respawn location.
local function fixSpawnLoc(spawnNum)
local oldSpawn
if spawnNum ~= 1 then
oldSpawn = levels[spawnNum-1]
else
oldSpawn = nil
end
local currentSpawn = levels[spawnNum]
if debounce == false then
debounce = true
player.RespawnLocation = currentSpawn
print("Respawn location set to:", player.RespawnLocation.Name, " for ", player.Name)
wait(3)
debounce = false
end
end
levels[1].Touched:Connect(function(hitPart)
fixSpawnLoc(1)
end)
It won’t create a new team, it will create a fake temp team. Also, why not make a custom checkpoint system? I made one awhile ago if that’s what you need
I am trying to make a custom checkpoint system, also when I changed the team colors to random colors on the spawn locations it would place me on the “neutral team” and I want a lobby team and a stage 1 team
then steer away from Spawnlocations, make a part which stands for the spawn then just teleport the character to the new spawnpoint every time they spawn