How do i make it so before a player clicks the start button they don't spawn until they click the start btn

So while there is a cutscene playing, how do i make it so while the cutscene is playing the player doesn’t spawn until they press the play button?
Heres the script

--Variables
local tween = game:GetService(	"TweenService")
local cam = workspace.Camera
local scene = workspace.Cameras
local currentTween = nil
local looping = true
repeat wait() until cam.CameraSubject ~= nil

cam.CameraType = Enum.CameraType.Scriptable

local cam = workspace.Camera
--Play Button
script.Parent.StartBtn.Visible = true
script.Parent.StartBtn.MouseButton1Click:Connect(function()
	cam.CameraType = Enum.CameraType.Custom
	script.Parent.Enabled = false
	looping = false
	currentTween:Pause()
end)

--Scenes
while looping do -- While true, it will loop the cutscene
	for i, v in pairs(scene:GetChildren()) do -- Its getting the Cameras Folder and looking into it and getting its children
	if looping == false then return end
	cam.CFrame = v["1"].CFrame
		currentTween = tween:Create(cam, TweenInfo.new(5),{CFrame = v["2"].CFrame})
		currentTween:Play()
		wait(5)
	end
end
1 Like

You can add a playeradded event and then move the character of the player to replicated storage and when they click the button they get moved to workspace

1 Like

You could do what many other games do a hide the player in a box until the cutscene finishes. Another way you can do this is by using the CharacterAutoLoads feature by setting CharacterAutoLoads to false. Here is a Roblox developer page on how it works: Players | Documentation - Roblox Creator Hub

1 Like