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

How do I make this door shut slower? And I need help with CFrame! D:

Asked by
Nidoxs 190
9 years ago
for i=0.1,script.Parent.Parent.Door.Size.y do 
script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame*CFrame.new(0,-1,0)
wait()
end  
1
To make the door shut slower, you can either edit the amount that you move the door each time the loop runs or extend the wait in between each run through the loop. RedCombee 585 — 9y
0
And why make the second number for the for loop the door's Y? Perci1 4988 — 9y
0
That is so It moves the size of its self. But I just copied it of someone and TRIED to edit it to my desire, but It didn't really work.. :( Nidoxs 190 — 9y
0
As Red said, just edit the wait. bobafett3544 198 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

First of all, i would highly recommend you making variables for you code. Like local door = script.Parent.Parent.Door

Also, you can make the door close sections at a time and increase the wait. I would also recommend putting this into a function if you use it many times in your code

Ad

Answer this question