Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone please help me with this script?

Asked by 10 years ago
local map = game.Workspace.MapMakingKitV1

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

game.Players.ChildAdded:connect(onPlayerEntered)

2 answers

Log in to vote
0
Answered by 10 years ago

Mg.

local map = game.Workspace.MapMakingKitV1

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

game.Players.PlayerAdded:connect(OnPlayerEnter)
end
0
Thanks! I was doin map.Destroy()! XD blockhaak2 1 — 10y
Ad
Log in to vote
0
Answered by
wazap 100
10 years ago

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

Answer this question