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

How to dictate where you will spawn?

We all know "the longest obby in roblox," right? How all the spawn locations are the same color, and you still spawn at the correct obstacle? Well, I'm trying to do the same thing, yet cannot figure out how. If I have multiple spawn locations of the same color, there's no telling which you'll spawn at.

How can I make it easier on myself by keeping all spawns the same color for an obby, yet still have the player spawn at the correct obstacle?

ANY help is much appreciated! Thanks! :)

ALSO, how would I tell what stage a player is on? Instead of having all the players grouped into a "team," possibly having the stage name or number next to their name?

2 answers

✓ Accepted answer

There are several ways to do this.

First, you can name your spawns: (This is logic, not Lua syntax)

player.CharacterAdded:connect(function(character) -- Every time the character spawns
	character:MoveTo("Spawn"..level the character is on) -- Move to the corresponding spawn
end)

I find this the best method to use, but if you don't like it, you can try to come up with your own.

2 comments

0

Thank you for your help. I'll take this into consideration

0

False.

Players have a property called RespawnLocation. A Player's RespawnLocation, coincidentally, must be a SpawnLocation instance. To set this, just do...

local spawn = Instance.new("SpawnLocation", workspace)

game.Players.LocalPlayer.RespawnLocation = spawn

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