Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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  

4 comments

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.

0

And why make the second number for the for loop the door's Y?

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.. :(

0

As Red said, just edit the wait.

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.