i don't understand what you are trying to do in the code, but i did as you asked, i didn't test it, try it and message back.
local sanyi
function Reset()
destroyElement(sanyi)
end
setTimer(
function()
local x, y, z = getElementPosition(localPlayer)
sanyi = createBlip(x, y, z, 0)
end, 2000, 0)
setTimer(Reset, 3000, 0)