When I tried to teleport the player in line 20 it worked but when I tried to teleport a part in line 31 it didn't work and I don't know why? Here is the script:

local TopText = script.TopText
while true do
	timer = 60
	repeat
		timer = timer-1
		TopText.Value = "Intermission ("..timer..")"
		wait(1)
	until timer == 0
	TopText.Value = "Picking Random Map..."
	wait()
	m = game.Lighting.Maps:GetChildren()
	r = math.random(1,#m)
	map = m[r]:clone()
	map.Parent = workspace
	TopText.Value = "The Map Chosen Was "..map.Name.."!"
	local Spawn = map.Spawn
	wait(5)
	plrs = game.Players:GetChildren()
	for i = 1, #plrs do
plrs[i].Character:MoveTo(map.Spawn.Spawn.Position+Vector3.new(math.random(-5,5),0,math.random(-5,5)))
	end
	wait()
	timer = 30
	repeat
		timer = timer-1
		TopText.Value = ""..timer.."Seconds Until The Wall"
		wait(1)
	until timer == 0
	Wall = game.ServerStorage.Wall:Clone()
	Wall.Parent = map
	Wall.Position = map.Spawn.Spawn.Position
		
	map:remove()
end

Thank you in advance if anyone figures out why! :)

1 comment

0

Is the Wall a group? If it's a group, use Wall:MoveTo(map.Spawn.Spawn.Position). If not, I'm not sure