There are (usually) two types of elevators in SL. The sort that an avatar sits on and the sort that push an avatar around. You haven't clearly said what type you are making. I'm going to guess that you mean the second type and try to explain why it's not working.
Your elevator probably moves with code something like this, llSetPos(llGetPos() + <0,0,10.0>);. That code snippet should move the elevator 10m above where it is currently located. To be clear, the elevator doesn't actually go up 10 meters (like in the real world) with that code snippet. The elevator simply ceases to be at it's current position and is instead instantly 10m higher. Your avatar (standing on it) would no longer be standing on anything because the elevator simply ceased to be where it was. For example:
Say the elevator is at <128.0, 128.0 20.0> on the ground.
Your avatar standing on it would be at (approximately) <128.0, 128.0, 21.0>.
The script sets the elevator position (using my code snippet above) to <128.0, 128.0, 30.0>.
Your avatar is still at <128.0, 128.0 21.0> with nothing under it. So, it falls to the ground.
This happens because llSetPos() doesn't move the object through all points in space between the current position and new position, it simply changes the position in a single jump.
This doesn't fix your problem, but does (hopefully) explain why it's not working.
To make things even worse (as far as understanding goes) there are three type of objects (that I know of).
There are physical objects affected by the physics engine (check the "physical" box in the object editor to make it physical). These objects will fall to the ground and get pushed around if you walk into them. When walking around, your avatar is a physical object.
There are non-physical objects that aren't affected by the physics engine. This is the default when you create an object. They won't move when you walk into them, they will stay where you put them (won't fall) but they will affect physical objects (you can stand on them). Most often when your avatar sits, it is in this state.
And there are phantom objects. A phantom object is similar to the non-physical object except you can walk through it and it doesn't affect physical objects. Check the phantom box in the object editor to make an object phantom.
Fun, huh?