Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can you make a curtain to open and close?

Asked by
dog6779 25
7 years ago
Edited 7 years ago

Like you are gonna make a curtain but it just like the bathroom curtains and windows curtain? like the hotels how they make the curtains open. Like when you click on them the open and closes. And what is the script for it?

1 answer

Log in to vote
0
Answered by 7 years ago

Firstly you will need a ClickDetector to detect when the curtains have been clicked on. After this you will need to call the MouseClick() event on the ClickDetector and CFrame the curtains at this point, I recommend using CFrame:lerp() to smoothly transition between the initial position and the resulting position.

Ad

Answer this question