NPC Code:
if (created) {
setshape2 width,height,{tiles,tiles,tiles...};
dontblock;
drawoverplayer;
timeout=0.1;
}
if (playertouchsme&&!playerattached) {
if (playerx<=x||playerx>=x+width) attachplayertoobj 0,id;
}
if (timeout) {
if (playerx<x||playerx>x+width) detachplayer;
timeout=0.1;
}
I just scripted this and it's meant to be used on server with NPC Server only (attachplayertoobj is a pay server only command anyway), it might not work since I haven't tested it.