Code: Select all
if glob.playerdiedtick==true then
glob.playerdiedtick=false
local entities = game.findentities{ topleft = {x = game.getplayer().position.x - 1, y = game.getplayer().position.y - 1}, bottomright = {x = game.getplayer().position.x + 1 ,y = game.getplayer().position.y + 1} }
for i,entity in ipairs(entities) do
if (entity.name== "Spawn") then
entity.destroy()
break
end
end
end