I need help with this map changing script, that wont work with teleporting, can someone help me?
So I have this script its below
Maps = {"ZombieFacility"} -- can add as many maps as you want
intermission = 15 -- intermission time
gamewait = 60 -- each round length
numofplayers = 1 -- How many players are required to start a round
timebeforeround = 5 --Time before round starts
wait(5)
function m(update)
c = game.Players:GetChildren()
for i=1, #c do
c[i].PlayerGui.InformationGui.Frame.TextLabel.Text = "" .. update
end
end
while true do
wait(1)
if game.Players.NumPlayers >= numofplayers then
01 | for i = 1 , intermission do |
02 | m( "Intermssion: " .. intermission -i) |
06 | pl = game.Players:GetChildren() |
09 | pl [ i ] .Playing.Value = true |
13 | rndum = math.random(#Maps) |
16 | game.Lighting [ cmap ] :Clone().Parent = game.Workspace |
20 | m( "The chosen map is " .. cmap) |
23 | plpl = game.Players:GetChildren() |
26 | if plpl [ i ] .Playing.Value = = true then |
27 | cspawn = game.Workspace [ cmap ] .Spawns.Spawn |
28 | plpl [ i ] .Character.Torso.CFrame = CFrame.new(cspawn.Position) |
Its really long and theres more that I didnt put on but right here on the bottom it says cant find Torso in Model, I have no idea why can someone help me?