[QUOTE=Agret;55539]
Suggest you use the ‘move’ command for moving your platform, it’s the smoothest 
Use this command:
attachplayertoobj 0,id;
Have a look at graal2001 pirate ships, shows you can use if(playerattached) when doing tests for your ‘move’ command.
Remember that playerx/playery will change to 0,0 when they are in the top left corner of your object once attached! (if you are using playerx/playery for your platform script)
[CODE]
if (created) {
setimg pirateship1.png;
drawunderplayer;
noplayeronwall;
this.mdir = -1;
this.speed = 3;
setstring this.warp,abcdefghijklmnopqrstuvwxy;
timeout = 0.1;
}
if (created || initialized) {
setshape 1,1416,2016;
}
if (actionmoveship) {
if (mdir>=0) {
mdir = int(strtofloat(#p(0)));
if (mdir>=0 && mdir<=3) {
setplayerprop #c,Aye Sir!;
this.mdir = mdir;
}
}
}
if (playerchats) {
setstring this.textp,#a;
this.testx = playerx;
this.testy = playery;
this.testx2 = x;
this.testy2 = y;
}
if (playerchats && (playerx in |x,x+14|) && (playery in |y,y+20|)) {
if (strequals(#c,stop)) {
setplayerprop #c,Aye Sir!;
this.mdir = -1;
} else if (strequals(#c,leave)) {
setplayerprop #c,Aye Sir!;
detachplayer;
if (x<25) {
playerdir = 3;
playerx = x+12;
} else {
playerdir = 1;
playerx = x-1;
}
}
}
if (timeout) {
if (this.mdir>=0) {
dir = this.mdir;
dist = this.speed;
newx = x + vecx(dir)*dist;
newy = y + vecy(dir)*dist;
levxmove = (newx<-4? -1 : newx>54? 1 : 0);
levymove = (newy<-4? -1 : newy>52? 1 : 0);
warped = false;
if (levxmove!=0 || levymove!=0) {
// Level warp
if (startswith(world,#L)) {
levx = indexof(#e(5,1,#L),#s(this.warp))+1;
levy = strtofloat(#e(7,2,#L));
if (levx>=1 && levy>=1 &&
(levx+levxmove in |1,25|) && (levy+levymove in |1,25|)) {
setstring this.dest,world#e(levx+levxmove-1,1,#s(this.warp))-;
if (levy+levymove<10) setstring this.dest,#s(this.dest)0;
setstring this.dest,#s(this.dest)#v(levy+levymove).nw;
warpto #s(this.dest),(levxmove<0? 54 : levxmove>0? -4 : x),
(levymove<0? 52 : levymove>0? -4 : y);
warped = true;
}
}
}
if (warped==false) {
if (!onwater2(newx+4.1,newy+4.1,5.8,7.8) ||
onwall2(newx+4.1,newy+4.1,5.8,7.8))
this.mdir = -1; // stop
else
move vecx(dir)*dist,vecy(dir)*dist,1,1;
}
}
timeout = 1;
}
//#CLIENTSIDE
if (created) {
setshape2 14,20,{
0, 0, 0, 0,22,22,22,22,22,22, 0, 0, 0, 0,
0, 0, 0,22,22,22,22,22,22,22,22, 0, 0, 0,
0, 0, 0,22,22,22,22,22,22,22,22, 0, 0, 0,
0, 0,22,22, 3, 3, 0, 0, 3, 3,22,22, 0, 0,
0, 0,22, 0, 3, 3, 0, 0, 3, 3, 0,22, 0, 0,
0, 0,22, 0, 0, 0, 0, 0, 0, 0, 0,22, 0, 0,
0, 0,22, 0, 0, 0, 0, 0, 0, 0, 0,22, 0, 0,
0, 8,22, 0, 0, 0,22,22, 0, 0, 0,22, 8, 0,
8, 8,22, 0, 0, 0, 0, 0, 0, 0, 0,22, 8, 8,
8, 8,22, 0, 0, 0, 0, 0, 0, 0, 0,22, 8, 8,
8, 8,22, 0, 0, 0, 0, 0, 0, 0, 0,22, 8, 8,
8, 8,22,22, 0, 0, 0, 0, 0, 0,22,22, 8, 8,
8, 0,22,22,22, 0,22,22, 0,22,22,22, 0, 8,
0, 0,22,22,22,22,22,22,22,22,22,22, 0, 0,
0, 0,22,22,22,22,22,22,22,22,22,22, 0, 0,
0, 0, 0,22,22,22,22,22,22,22,22, 0, 0, 0,
0, 0, 0, 0,22,22,22,22,22,22, 0, 0, 0, 0,
0, 0, 0, 0, 0,22,22,22,22, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,22,22, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
dontblock;
}
if (playerenters || timeout) {
if (playerattached) {
if ((strequals(#m,grab) || strequals(#m,pull)) && playerdir==2) {
mdi