Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Intermission Script won't fully work, any solutions?

I'm creating an intermission script, and I'm stuck on how I'll remove the map after the round is over (The ending of the script).

The working part of the script:

local replicatedstorage = game:GetService ("ReplicatedStorage")
local status = replicatedstorage:WaitForchild("Value")

while true do
for i = 30,1,-1 do
status.value = "Intermission Time: "
wait(1) 	
end
local map = game.ServerStorage.Map1
Map:Clone().Parent = game.Workspace
wait(20)

I've been thinking about the one below. (Though it hasn't worked the times I've tested it)

game.workspace.BaseMap:Remove()
status.value = "Round finished; Good game Contestants!"
end

I need help to figure out the last part.Is there anyway to fix this problem?

1 comment

1

First, :Remove() is deprecated. Use :Destroy() instead.

1 answer

It's really simple.

Keep a reference to the cloned map:

local map = game.ServerStorage.Map:Clone()
map.Parent = workspace

Now, you can use that reference to destroy it whenever you wish.

map:Destroy()

This discussion is preserved as it was. New answers, comments, and votes are closed.