01 | function moveCurtains(curtain 1 , curtain 2 , v, n, t) |
03 | curtain 1. CFrame = curtain 1. CFrame + v |
04 | curtain 2. CFrame = curtain 2. CFrame - v |
11 | workspace.CurtainOne, workspace.CurtainTwo, |
12 | Vector 3. new( 0.1 , 0 , 0 ), 100 , 0.03 |
17 | workspace.CurtainOne, workspace.CurtainTwo, |
18 | -Vector 3. new( 0.1 , 0 , 0 ), 100 , 0.03 |
Might need to play around with it. The t
parameter is for the time between each small movement, defined by the v
parameter and does this small movement 100 times, defined by the n
parameter. t
is currently 0.03 and is as small as the delay (between small movements) can get. It's as "small" as the wait function gets. If you wanted to make the curtains move more quickly apart but still move 10 studs out, you would do something like this,
2 | workspace.CurtainOne, workspace.CurtainTwo, |
3 | Vector 3. new( 0.2 , 0 , 0 ), 50 , 0.03 |
Hope I made it so you can understand how this works as it can be a bit confusing :)