It won't teleport player for some reasons

  1. Im trying to make round system

  2. for some reasons when all people dying next round won’t teleport people who died

-- Timer Script
local Rep = game.ReplicatedStorage
local RoundStarted = Rep.RoundStarted
local InRound = script.Parent.Parent.Parent.Parent.InRound
local Character = script.Parent.Parent.Parent.Parent.Character
local TotalPeople = Rep.TotalPeopleInRound
function Format(Int)
	return string.format("%02i", Int)
end

function convertToMS(Seconds)
	local Minutes = (Seconds - Seconds%60)/60
	Seconds = Seconds - Minutes*60
	return Format(Minutes)..":"..Format(Seconds)
end

RoundStarted.Changed:Connect(function(NewValue)
	if NewValue == true then
		for i = 1,10 do
			if RoundStarted.Value == false then
			script.Parent.Text = "Round Ended"
			wait(1)
			break
			else
			script.Parent.Text = "Round In Progress "..convertToMS(10-i)
			wait(1)
			end
		end
		if InRound.Value == true then
		print("Player Was in the round")
		Character:FindFirstChild("HumanoidRootPart").Position = game.Workspace.SpawnLocation.Position
		InRound.Value = false
		end
		wait(1)
		if Character:FindFirstChild("ClassicSword") then
			print("Found Sword")
			Character.ClassicSword:Destroy()
		elseif script.Parent.Parent.Parent.Parent.Backpack:FindFirstChild("ClassicSword") then
			script.Parent.Parent.Parent.Parent.Backpack.ClassicSword:Destroy()
		end
		if TotalPeople.Value ~= 0 then
		print("People is not 0 ")
		TotalPeople.Value = TotalPeople.Value - 1
		end
		print("Round is over")
		RoundStarted.Value = false
	else
		wait(1)
		for i = 1,5 do
			if RoundStarted.Value == true then
				script.Parent.Text = "Round Started"
				wait(1)
				break
			else
				script.Parent.Text = "Round Starting in "..5-i
				wait(1)
			end
		end
        print("Giving Player A Sword")
		local SwordClone = Rep.ClassicSword:Clone()
        print("Changing InRound to true")
		InRound.Value = true
		print("Moving Sword into the player Character")
		SwordClone.Parent = Character
		print("Adding One More Player Into TotalPeople")
		TotalPeople.Value = TotalPeople.Value + 1
		print("Teleporting Player")
		Character:FindFirstChild("HumanoidRootPart").CFrame = game.Workspace.TrashCan.CFrame
		print("Making Round Start")
		RoundStarted.Value = true
	end
end)
--Script That Checks if player died
local RoundStarted = game.ReplicatedStorage.RoundStarted
local TotalPeopleInRound = game.ReplicatedStorage.TotalPeopleInRound
RoundStarted.Changed:Connect(function(NewValue)
	print("RoundStarted Changed"..tostring(NewValue))
	if NewValue == true then
		print("Round Is Started")
		for i,v in pairs(game.Players:GetChildren()) do
			print("Getting Players")
			if v.InRound.Value == true then
				print("Player Is InRound")
				v.Character.Humanoid.Died:Connect(function()
					print("Player Died")
					print("Round is not over")
					v.InRound.Value = false
					print("Removed Player From InRound")
						TotalPeopleInRound.Value = TotalPeopleInRound.Value - 1
						print("Removed one from total people")
				end)
			end
		end
	end
end)
TotalPeopleInRound.Changed:Connect(function(NewValue)
	print("TotalPeople Changed"..tostring(NewValue))
	if NewValue == 0 then
		print("Value is 0")
		RoundStarted.Value = false
		print("Round is now ended")
	end
end)

No Errors btw already checked if it had errors

hmm try

Character.PrimaryPart

Thats not the case it will work fine if player won’t die

use

Character.HumanoidRootPart.Position = Vector3.new() -- Position

hmm then do

Character:SetPrimaryPartCFrame()

As I said earlier it will work fine if player won’t die

That wont work lol. It would just make it buggy. CFrame is wayy better

bruh it works if player is not dying it teleports him
but when player dies and then respawns the round system won’t teleport him

it works on my old games that i made tho

wait so your saying you want it to tp when the player respawns right?

well guess in newer you need cframe for much smoother things

RIP grammer

Character:FindFirstChild("HumanoidRootPart").Position = Vector3.new(game.Workspace.SpawnLocation.Position.X, game.Workspace.SpawnLocation.Position.Y, game.Workspace.SpawnLocation.Position.Z)

nah thats not what im saying im talking about my round system its not teleporing player if he dies

whats the point of doing that?

in next round not in the old one*

OK! I have a trick
So there is a property in player called player.RespawnLocation use that

did you understand what I want to make? looks like you didn’t

One sec I will make a video for you to check

You said " Make the player tp to area after respawn "

Me?