Look at Avatar

Written by Kitsune
// Make object this script is on hover above the ground and point its
// forward axis at its owner.
 
default
{
                on_rez(integer n) //integer n er pas later achtergezet!
        {
                // turn on physics for the object
                llSetStatus(STATUS_PHYSICS, TRUE);
 
                // make the object hover 1m above the ground or the water
                llSetHoverHeight(1.0, TRUE, 1.0);
 
                // look for owner
                llSensorRepeat(
                "",             // name - anyone
                llGetOwner(),   // key - the owner
                AGENT,          // type - agents (avatars)
                10.0,           // range - search within 10m
                PI,             // arc - search 360 degrees around
                5.0             // rate - search every 5 seconds
                );
 
                // This makes the object stay put
                llMoveToTarget(llGetPos(), 1.0);
        }
 
        sensor(integer n)
        {
                // point object's forward axis at the detected avatar
                llLookAt(llDetectedPos(0), 1.0, 1.0);
        }
}