the error is Cframe is not a valid member of Part "Workspace.Forest.SpawnPoints.SpawnPoints"
the line of code that isnt working is
character:FindFirstChild("HumanoidRootPart").Cframe = AvailableSpawnPoints[1].Cframe
the chunk of code is
local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")
if not SpawnPoints then
print("no spawnpoints")
end
local AvailableSpawnPoints = SpawnPoints:GetChildren()
for i, player in pairs(plrs) do
if player then
character = player.Character
if character then
--teleports them
character:FindFirstChild("HumanoidRootPart").Cframe = AvailableSpawnPoints[1].Cframe
else
table.remove(AvailableSpawnPoints,1)
local Sword = ServerStorage.Sword:Clone()
Sword.Parent = player.Backpack
local GameTag =Instance.new("BoolValue")
GameTag.Name = "GameTag"
GameTag.Parent = player.Character
end
if not player then
table.remove(plrs,i)
end
end
end
end

1 comment
It's CFrame