Unable to assign property CFrame. coordinatedframe

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to create a round system for my new project I’ve been working on

  2. What is the issue? Include screenshots / videos if possible!
    I try to teleport all the players to the spawnpoints in each of the randomly selected maps

function tpPlrs(mapSp)
	for i, plr in pairs(game.Players:GetPlayers()) do
		local char = plr.Character
		if char then
			local humanoid = char:FindFirstChild("HumanoidRootPart")
			humanoid.CFrame = mapSp.CFrame
		end
	end
end

function startRound(plrs, maps, modes)
	
	local inRound = false
	
	for i = inter, 0, -1  do
		status.Value = "Starting in "..i
		wait(1)
	end
	
	local chosenMap = maps[math.random(1, #maps)]
	local clonedMap = chosenMap:Clone()
	clonedMap.Name = "Map"
	clonedMap.Parent = workspace
	
	inRound = true
	
	for i = timer, 0, -1  do
		status.Value = i
		wait(1)
		
		tpPlrs(clonedMap.Spawnpoints:GetChildren())
		
		if timer == 0 then
			clonedMap:Destory()
		end
	end
	
	inRound = false
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

2 Likes

I think this should work: humanoid.CFrame = CFrame.new(mapSp.Position)
(its the teleport script i use personally)

i tried it but it returned me an error: invalid argument #1 to ‘new’ (Vector3 expected, got nil)

i was able to find a solution to the problem. thanks for the help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.