Click play to end cutscene and spawn in

I still spawn

1 Like

What is the issue with the spawning?

I’m really confused on how your character is not spawning for you… it actually works fine for me and doesn’t spawn my character until I click play, but I’m not sure why it’s not working for you.

EDITED ServerScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Event = ReplicatedStorage:FindFirstChild("spawnPlayer")
local PlayersFolder = ReplicatedStorage:FindFirstChild("PlayersFolder")
if not Event then
	local newEvent = Instance.new("RemoteEvent")
	newEvent.Name = "spawnPlayer"
	newEvent.Parent = ReplicatedStorage
	Event = newEvent
end
if not PlayersFolder then
	PlayersFolder = Instance.new("Folder")
	PlayersFolder.Name = "PlayersFolder"
	PlayersFolder.Parent = ReplicatedStorage
end

Event.OnServerEvent:Connect(function(Player)
	if Player:GetAttribute("loadedMenu") == false then
		Player:SetAttribute("loadedMenu", true)
		Player.Character.Parent = game.Workspace
		for i,v in pairs(game.Workspace:GetDescendants()) do
			if v:IsA("SpawnLocation") then
				Player.Character:MoveTo(v.Position)
				break
			end
		end
	end
end)

Players.PlayerAdded:Connect(function(Player) 
	Player:SetAttribute("loadedMenu", false)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	Character.Archivable = true
	for i,v in pairs(game.Workspace:GetDescendants()) do
		if v:IsA("SpawnLocation") then
			Character:MoveTo(v.Position)
			break
		end
	end
	task.wait()
	Character.Parent = PlayersFolder
	Player.CharacterAdded:Connect(function(Char)
		Char.Archivable = true
		if Player:GetAttribute("loadedMenu") == false then
			for i,v in pairs(game.Workspace:GetDescendants()) do
				if v:IsA("SpawnLocation") then
					Char:MoveTo(v.Position)
					break
				end
			end
			task.wait()
			Char.Parent = PlayersFolder
		end
	end)
end)

I am spawning it but I spawn in before I click play.

EDIT I tested the serverscript you sent and I still spawned in before.

I just realized the mistake I made… Just go back to my last post and re-copy the script. It will definitely work!

Hmm… I’m still very confused why it isn’t working!!!

Which post are you talking about?

I’m talking about the post I just edited. I edited the script there and I told to re-copy.

I’ll just repost the script in here…

ServerScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Event = ReplicatedStorage:FindFirstChild("spawnPlayer")
local PlayersFolder = ReplicatedStorage:FindFirstChild("PlayersFolder")
if not Event then
	local newEvent = Instance.new("RemoteEvent")
	newEvent.Name = "spawnPlayer"
	newEvent.Parent = ReplicatedStorage
	Event = newEvent
end
if not PlayersFolder then
	PlayersFolder = Instance.new("Folder")
	PlayersFolder.Name = "PlayersFolder"
	PlayersFolder.Parent = ReplicatedStorage
end

Event.OnServerEvent:Connect(function(Player)
	if Player:GetAttribute("loadedMenu") == false then
		Player:SetAttribute("loadedMenu", true)
		Player.Character.Parent = game.Workspace
		for i,v in pairs(game.Workspace:GetDescendants()) do
			if v:IsA("SpawnLocation") then
				Player.Character:MoveTo(v.Position)
				break
			end
		end
	end
end)

Players.PlayerAdded:Connect(function(Player) 
	Player:SetAttribute("loadedMenu", false)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	Character.Archivable = true
	for i,v in pairs(game.Workspace:GetDescendants()) do
		if v:IsA("SpawnLocation") then
			Character:MoveTo(v.Position)
			break
		end
	end
	task.wait()
	Character.Parent = PlayersFolder
	Player.CharacterAdded:Connect(function(Char)
		Char.Archivable = true
		if Player:GetAttribute("loadedMenu") == false then
			for i,v in pairs(game.Workspace:GetDescendants()) do
				if v:IsA("SpawnLocation") then
					Char:MoveTo(v.Position)
					break
				end
			end
			task.wait()
			Char.Parent = PlayersFolder
		end
	end)
end)
1 Like

Sorry, I was eating dinner. Let me test this.

I am still spawning in before I click play.

Do you have a script that spawns the player in other than the ones I gave you?

No, I don’t think so. Is there something in properties I should change?

All I need now is something that keeps the player from spawning until the player clicks play.

Hmm, so the script didnt worked?
If no then can make the well explained script and give you it? (ill start tonight tho when i wake up lul)

It does work but I made a new post on what needs fixed: Players Can't spawn until Clicking Play - #7 by 1PixeI1

I don’t spawn before now, but when I click play my character is invisible and I am unable to move.

ServerScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Event = ReplicatedStorage:FindFirstChild("spawnPlayer")
local PlayersFolder = ReplicatedStorage:FindFirstChild("PlayersFolder")
if not Event then
	local newEvent = Instance.new("RemoteEvent")
	newEvent.Name = "spawnPlayer"
	newEvent.Parent = ReplicatedStorage
	Event = newEvent
end
if not PlayersFolder then
	PlayersFolder = Instance.new("Folder")
	PlayersFolder.Name = "PlayersFolder"
	PlayersFolder.Parent = ReplicatedStorage
end

Event.OnServerEvent:Connect(function(Player)
	if Player:GetAttribute("loadedMenu") == false then
		Player:SetAttribute("loadedMenu", true)
        Player.Character.Archivable = true
		Player.Character.Parent = game.Workspace
		for i,v in pairs(game.Workspace:GetDescendants()) do
			if v:IsA("SpawnLocation") then
				Player.Character:MoveTo(v.Position)
				break
			end
		end
	end
end)

Players.PlayerAdded:Connect(function(Player) 
	Player:SetAttribute("loadedMenu", false)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	Character.Archivable = true
	for i,v in pairs(game.Workspace:GetDescendants()) do
		if v:IsA("SpawnLocation") then
			Character:MoveTo(v.Position)
			break
		end
	end
	task.wait()
	Character.Parent = PlayersFolder
	Player.CharacterAdded:Connect(function(Char)
		Char.Archivable = true
		if Player:GetAttribute("loadedMenu") == false then
			for i,v in pairs(game.Workspace:GetDescendants()) do
				if v:IsA("SpawnLocation") then
					Char:MoveTo(v.Position)
					break
				end
			end
			task.wait()
			Char.Parent = PlayersFolder
		end
	end)
end)
1 Like

I still spawn invisible. Is there an actual way for this to work?

I still spawn invisible. Is there an actual way for this to work??

1 Like