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?
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.
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