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

[Just to be double sure] any errors with this script?

local Map1 = game.Lighting.Map1
while true do
	wait(420)
	if (game.Workspace.Map1 ~= nil) then
		game.Workspace.Map1:Destroy()
	end
	local M = Instance.new("Message", game.Workspace)
	M.Text = "Inserting Toxic Speed"
	wait(2)
	Map1:Clone().Parent = game.Workspace
	M:Remove()
	wait(1)
end

It's a Map Changing script, I couldn't find any errors in output, Can you? Thanks.

1 answer

✓ Accepted answer

Indexing game objects directly will error if they do not exist. if (game.Workspace.Map1 ~= nil) then should be replaced with if workspace:FindFirstChild("Map1")then

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