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

How to make a script that makes a player spawn in a different location?

Asked by 7 years ago

So I'm making a game where there's going to be a room which is basically the intro for the game. How do I make it so that after the player finishes the intro, the spawn location is now in a different place on the game? Because if the player dies, they spawn back into the intro room which is what I don't want to happen since I want the intro to run only once. Please help!

2 answers

Log in to vote
2
Answered by 7 years ago
Edited 7 years ago

Create a boolean variable called 'SpawnIntro' or something. By default, set it to true. Once the user completes the intro, set it to false. When players die/before they spawn check the value of the variable. If it's true, it will spawn them at the introduction. If not, wherever you set the other location to.

Ad
Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

Firstly do game.Workspace.SpawnLocation.Position = x,y,z --Set to what the spawn is called and the co-ords of where you want the spawn point to be

Answer this question