Object:Destroy() Doesn't work

Hey everyone!
So, I’m currently developing a game in which, every 120 seconds, a new map generates. And I want to add a timer that starts counting every time a new map is generated. But when I try to destroy the map and create a new one, it doesn’t delete it, and the timer stops with the map still there.
Any ideas on what I am doing wrong?

Here is the main game script:

math.randomseed(tick())
local map1 = game.ReplicatedStorage.Maps.Map1
local map2 = game.ReplicatedStorage.Maps.Map2
local map3 = game.ReplicatedStorage.Maps.Map3
local allinall = game.ReplicatedStorage.Maps.AllInAll
local map1show = game.StarterGui.CurrentMap1
local map2show = game.StarterGui.CurrentMap2
local map3show = game.StarterGui.CurrentMap3
local map4show = game.StarterGui.CurrentMap4
local onetwentytimer = game.StarterGui.OneTwentyTimer
local onetwentytimer2 = game.StarterGui.OneTwentyTimer2
local onetwentytimer3 = game.StarterGui.OneTwentyTimer3
local oneeightytimer = game.StarterGui.OneEightyTimer

function clonemap1 ()
	local map1clone = map1:Clone()
	map1clone.Parent = game.Workspace
	map1show.Enabled = true
	onetwentytimer.Enabled = true
	while onetwentytimer.Enabled == true do
		task.wait(1)
		if onetwentytimer.Enabled == false then
			map1clone.Destroy()
			map1show.Enabled = false
			onetwentytimer.Enabled = false
			break
		end
	end
end
function clonemap2 ()
	local map2clone = map2:Clone()
	map2clone.Parent = game.Workspace
	map2show.Enabled = true
	onetwentytimer2.Enabled = true
	while onetwentytimer2.Enabled == true do
		task.wait(1)
		if onetwentytimer2.Enabled == false then
			map2clone.Destroy()
			map2show.Enabled = false
			onetwentytimer2.Enabled = false
			break
		end	
	end
end
function clonemap3 ()
	local map3clone = map3:Clone()
	map3clone.Parent = game.Workspace
	map3show.Enabled = true
	onetwentytimer3.Enabled = true
	while onetwentytimer3.Enabled == true do
		task.wait(1)
		if onetwentytimer3.Enabled == false then
			map3clone.Destroy()
			map3show.Enabled = false
			onetwentytimer3.Enabled = false
			break
		end	
	end
end
function allinallclone ()
	local allclone = allinall:Clone()
	allclone.Parent = game.Workspace
	map4show.Enabled = true
	oneeightytimer.Enabled = true
	while oneeightytimer.Enabled == true do
		task.wait(1)
		if oneeightytimer.Enabled == false then
			allclone.Destroy()
			map4show.Enabled = false
			oneeightytimer.Enabled = false
			break
		end	
	end
end

while true do
	local randomnum = math.random(1,4)
	if randomnum == 1 then
		print(randomnum)
		clonemap1()
	end
	if randomnum == 2 then
		print(randomnum)
		clonemap2()
	end
	if randomnum == 3 then
		print(randomnum)
		clonemap3()
	end
	if randomnum == 4 then
		print(randomnum)
		allinallclone()
	end
end

If you need any other script, don’t hesitate to reply asking me for it.
Thank You!

When do you set onetwentytimer to true? outside of the functions?

It’s :Destroy() not .Destroy().

There really was a typo. But it still didn’t change the map

I could not understand your question. Could you please explain more?

I pointed that out because that was definitely something that could error and stop the script, though it didn’t seem like that was the main issue. Apologies for my oversight.

Upon further review of your code, I noticed that you referenced StarterGui for your UIs. AFAIK, any Gui object in StarterGui gets cloned into a player’s PlayerGui upon joining, so you trying to set Enabled properties wouldn’t replicate assuming that’s what you intended, unless there’s something else you have to make that work, that isn’t presented in the code you provided.

Regarding the map issue, the above might or might not fix the issue, and if not could you provide any errors or warnings that may appear in the output?

I don’t believe that the problem is in the timer because it Enables and Disables normally. The only problem is that the map and the GUI Showing which map you are playing in don’t change. And still no errors show up.