to make your system work properly, use onDeath. With onDeath, you can add the reward directly to the corpse and have more control over when the script is triggered after a player dies
local fromPos = {x = 4260, y = 5719, z = 6}
local toPos = {x = 4263, y = 5722, z = 6}
local function...