float vecdist = llVecDist(llGetPos(),llDetectedPos(i));
for(i=0;i<n;i++)
integer targetID;
vector destination;
float range = 0.5;
string temp;
integer i;
default
{
state_entry()
{
llListen(2,"",llGetOwner(),""
;}
listen(integer channel, string name,key id,string message)
{
temp=llGetSubString(message,0,6);
if(temp=="follow "

{
temp=llGetSubString(message,7,-1);
llSensor("",NULL_KEY,AGENT,96,PI*2);
}
else if (message == "reset"

{
llResetScript();
}
else if(message == "stop follow"

{
llTargetRemove(targetID);
llStopMoveToTarget();
}
}
sensor(integer n)
{
destination = llDetectedPos(i);
targetID = llTarget(destination, range);
float dif = 5;
{
vector detpos = llDetectedPos(i);
if(llSubStringIndex(llToLower(llDetectedName(i)),llToLower(temp))!=-1)
{
llMoveToTarget(<detpos.x -= 1,detpos.y,detpos.z>, 0.1);
llOwnerSay("follow " + llDetectedName(i));
}
}
}
listen(integer channel, string name,key id,string message)
{
if(message == "stop follow"

llTargetRemove(targetID);
llStopMoveToTarget();
}
}
could anyone point me in the right direction , or tell me where to look , THnaks.
sorry if this is an imbeded script im not sure how to do that.

sry for that. If it ont work post what compiler says or what is the objects behavior.
. I'll fix that right away ty.