The goal of these scripts is to have a round based teleportation to a spawn pads, and after death go back to the lobby area. The error is that when the players team changes, the character does not get teleported to the spawn pads.

Script A

--Round Variables
local inttime = 30
local gametime = 110

--Round Objects
local status = game.ReplicatedStorage.Status
--Main
while wait() do
	for i=inttime,1,-1 do
		local players = game.Players:GetChildren()
		for i,plr in pairs(players) do
			plr.Team = game.Teams.Dead
		game.ServerScriptService.FreeForAll.Disabled = true
		wait(1)
		status.Value = "int"
		end
		end
	local players = game.Players:GetChildren()
		for i,plr in pairs(players) do
			plr.Team = game.Teams.Players
			
	for i=gametime,1,-1 do
		wait(1)
		status.Value = "ffa"	
		end
		game.ServerScriptService.FreeForAll.Disabled = false
		end

Script B

players = game.Players:GetChildren()
map = game.Workspace.Map
pads = game.Workspace.Pads

while wait() do
	for i, player in pairs(game.Players:GetPlayers()) do
    	player.Character.Torso.CFrame = pads:findFirstChild(i).CFrame
		print("teleported")
	end
	wait(120)
end


3 comments

0

Which line of code has the error?

0

i dont get a error, it just doesnt teleport the player

0

Can we see the output, also the pads themselves?