So basically i have a couple stages of an obby and i want to have checkpoints. Everywhere online it tells me to allow team change on touch etc. For some reason it doesn't work for me and i feel like even if its done it will spawn me in one of the many spawnblocks so i personally think its unreliable.
Currently i want to know whether i can manipulate the spawnlocation specifically which looks something like this:
player.SpawnLocation=currentStage(changed though touching a block)
I have another question, how would write a statement which says "if in contact with 3rd party object"
Apologiese for the terrible explanation Thank you!
The player object has a property called RespawnLocation. This property allows you to manipulate the spawn location of the player.
Insert a script into your spawnlocation with this code:
script.Parent.Touched:Connect(function(Hit) if Hit.Parent:FindFirstChild("Humanoid") then -- checking if the hit is a player local char = Hit.Parent local player = game.Players:GetPlayerFromCharacter(char) -- getting player if player then player.RespawnLocation = script.Parent end end end)
As for your second question, you can also use .Touched to detect if the player is in contact with X object.
Closed as Not Constructive by User#19524
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?