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

Why does my door move up when I use CFrame to move down?

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.

part = script.Parent
for i = 1,100 do
	part.CFrame = CFrame.new(part.Position + Vector3.new(0,-1,0))
	wait(5)
end

1 answer

✓ Accepted answer

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

3 comments

0

Also check the rotation of the part

0

I changed the part the script moved and the door started to work! Thanks.

0

Your welcome :) glad someone wasn't rude to me for tryin to help ????

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