So I was coding a door to move down when a button was pressed. To test my code, I used a loop and a wait to control the door. But whenever I hit test, regardless of what I put in the parenthesis, the door just moves up. Does anyone know why? Thanks.
1 | part = script.Parent |
2 | for i = 1 , 100 do |
3 | part.CFrame = CFrame.new(part.Position + Vector 3. new( 0 ,- 1 , 0 )) |
4 | wait( 5 ) |
5 | end |
The part you want to move is upside down ? I've noticed with doors .CFrame is specific and moves the part according to X,Y,Z positioning. A rotation of your part should help. Often times I have to resize my part so that it moves the way I want it to go