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

Can someone please help me with this script?

local map = game.Workspace.MapMakingKitV1

function onPlayerEntered(newPlayer)
	--How could I delete map here? 
end

game.Players.ChildAdded:connect(onPlayerEntered)

2 answers

Mg.

local map = game.Workspace.MapMakingKitV1

function OnPlayerEnter(newplayer)
wait()
map:Destroy() -- Destroys the map in one shot.

game.Players.PlayerAdded:connect(OnPlayerEnter)
end

1 comment

0

Thanks! I was doin map.Destroy()! XD

That code still has an error

local map = game.Workspace.MapMakingKitV1

function OnPlayerEnter(newplayer)
wait()
map:Destroy() -- Destroys the map in one shot.


end
game.Players.PlayerAdded:connect(OnPlayerEnter)--outside function plox

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