This Sliding Door LSL Script (Copy/Mod) is built for creators, builders, and scripters who want an easy, smooth, and professional door movement system in Second Life. It gives your builds a realistic sliding door motion with full control over speed, distance, and direction. Whether you’re making a modern home, a sci-fi facility, or a club with automatic access points, this script handles the movement cleanly and efficiently.
Let’s break down what makes it work.
The script uses physics-based motion (llMoveToTarget) combined with phantom and non-phantom transitions, allowing the door to move naturally while preventing collision glitches. Once activated, the door slides open smoothly along a preset vector offset — defined by the variable OFFSET. You can easily change this offset to move the door in any direction: forward, backward, up, down, left, or right.
The opening and closing times are fully adjustable with OPENTIME and CLOSETIME. You can make it glide fast or move slowly for a more realistic feel. By default, the open time is 1 second, and the close time is 3.5 seconds — giving you a nice, believable animation speed.
Here’s how it works when you touch it:
When the door is closed, a simple touch triggers the MoveDoor() function, setting the door to open mode. It calculates the door’s current position and rotation, then moves it to the target offset position using physics.
While it’s moving, the door becomes phantom, so avatars and objects don’t block it.
When the timer runs out (after it finishes opening or closing), it resets itself — physics are turned off, phantom mode is disabled, and the door is locked neatly in its new position.
If touched again, it reverses the process, returning the door to its starting point with the same smooth motion.
That’s it — no clunky hinges, no awkward rotations, no “snapping” back to default. Just pure, clean sliding movement.
You can tweak the constants easily:
vector OFFSET = <4.0, 0.0, 0.0>; // Distance and direction
float OPENTIME = 1; // Opening duration
float CLOSETIME = 3.5; // Closing duration
Want it to move vertically like an elevator door? Change OFFSET to <0.0, 0.0, 4.0>.
Want it to slide backward into a wall? Try <-4.0, 0.0, 0.0>.
How to Use:
Drop the script inside your door object’s contents.
Make sure your door is a separate prim or linked part that can move independently.
Adjust the OFFSET, OPENTIME, and CLOSETIME values at the top of the script to fit your design.
Touch the door inworld — it will slide open smoothly. Touch again to close it.
Test different values until you get the exact motion and timing you want.
This script is perfect for creators who want total control but also want simplicity. It’s designed to be clean, readable, and easy to modify. You don’t need to know complex scripting — just basic understanding of direction vectors and timing will let you customize it completely.
It also includes copy/mod permissions, so you can adjust and reuse it across multiple builds. You can modify it for single doors, double doors, or even sliding gates. For double doors, simply use two doors mirrored with opposite OFFSET values.
The script doesn’t rely on unnecessary timers or chat commands — it’s event-based, lightweight, and reliable. That means minimal lag, even on busy sims.
If you’re running a store, club, or RP environment, this door script adds a touch of realism and polish. It’s also useful for roleplay builds, sci-fi bases, fantasy castles, or anything that benefits from sliding door mechanics instead of rotating ones.
In addition, since the script toggles physics dynamically, you don’t have to worry about the door getting “stuck” or being pushable by avatars. It resets itself perfectly every time.
For advanced users, you can integrate this with access control systems or sensors — for example, adding a proximity detector to open automatically when someone walks near. Because it’s modifiable, you can freely expand it with your own logic or link messages.
In short:
It looks good.
It’s easy to use.
It runs efficiently.
It’s customizable.
And it’s fully yours to edit.
Practical Example:
Say you’re building a futuristic lab. You want the door to slide sideways when someone enters. You drop in the script, set OFFSET to <2.5, 0.0, 0.0>, OPENTIME to 0.8, and CLOSETIME to 2.5. Done — your door now slides open fast and closes slowly, giving it a nice “automatic door” vibe.
Or, if you’re designing a hidden wall panel that moves vertically, just set OFFSET to <0.0, 0.0, 3.0>. The same script handles it flawlessly.
This is the kind of script that quietly improves your builds — no flashy effects, no bloat, just solid movement control that looks natural and works every single time.
If you care about quality, this script delivers it cleanly.
- Smooth sliding door motion using physics-based control.
- Fully adjustable open/close direction and speed.
- Touch-to-open and touch-to-close toggle system.
- Lightweight, lag-free, and easy to edit.
- Copy/Mod permissions for full customization.








