First, target_ply is always going to be the calling player. You forget, ULX first variable passed is always the player calling the command.
Even if you pass it the optional 'player arg' after "ulx getpos <someone>", someone will be ignored.
As for the current error, I'm guessing -
I think GetPos() doesn't return '3' variables x y z.
It returns '1' (table?) with .x , .y, .z inside of it.
You're attempting to assign 3 variables from one command/table.
So you might have better luck in one of two ways
local target_ply_pos = target_ply:GetPos()target_ply_pos.x would be x, target_ply_pos.y would be y, and target_ply.z would be z.
Or
local target_ply_posx, target_ply_posy, target_ply_posz = target_ply:GetPos().x, target_ply:GetPos().y, target_ply:GetPos().z
That's my guess.
A person more recently involved in lua and Gmod would likely blow my theory away, but, feel free to test while you wait.