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

How can I delay the player's spawn?

Asked by 3 years ago

So I need to delay the player's spawn until a specific GUI gets moved to the starterGui, I would show some code but I have literally no idea on this one, any help would be appreciated.

1 answer

Log in to vote
0
Answered by 3 years ago

You could spawn the character in a hidden box or something and move him to the real spawnpoint using the UpperTorso CFrame after the GUI got moved.

local LPlayer = game.Players.LocalPlayer

if gui.Visible == false then --Change it to your GUI

if LPlayer.Character and LPlayer.Character:FindFirstChild("UpperTorso") then
LPlayer.Character.UpperTorso.CFrame = CFrame.new(-6012.021, -62.02, -4623.01) --The Position
Ad

Answer this question