Coloca la na sua lib :
Config_ = {
back = {
[0] = {x = 0, y = 1},
[1] = {x = -1, y = 0},
[2] = {x = 0, y = -1},
[3] = {x = 1, y = 0},
};
}
function effectWhenWalking(player_uid, id_effect)
local player = Player(player_uid)
if player then
local player_position = player:getPosition()
local player_direction = player:getDirection()
local player_pos_x = player_position.x
local player_pos_y = player_position.y
local player_pos_z = player_position.x
local position = {x = player_pos_x + Config_.back[player_direction].x,y = player_pos_y + Config_.back[player_direction].y,z = player_pos_y}
position:sendMagicEffect(id_effect)
addEvent(effectWhenWalking, 1, player_uid, id_effect)
end
end
um jeito para você utilizar essa função :
local player_uid = player.uid
effectWhenWalking(player_uid, 10)