game.Workspace.Brick.CFrame = CFrame.new(game.Workspace.Brick.Position, Vector3.new(0,50,0))
I was just looking at Vector3s and stuff so I wanted to find out how to make a door rotate about 180 degrees like a circle, so halfway basically. I can't figure out where i'm supposed to find the cordinates to do that, so do you just have to guess and put in random numbers until it works, or is there something i'm missing? (Also, brick is the name of my part that I want to rotate).
The CFrame constructor on its own(normally) does not provide rotation. It also doesn't require a Vector3. It requires 3 numbers, x, y, and z. For example:
workspace.Brick.CFrame = CFrame.new(1, 1, 1)
This will only set the position, and it'll be at position 1, 1, 1. But you're trying to make a door spin, so you add on that CFrame.new() with a CFrame.Angles(), this uses radians, not degrees so you must use math.rad() to imput degrees into CFrame.Angles().
Example:
workspace.Brick.CFrame = CFrame.new(1, 1, 1) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(90))
That would set the bricks position to 1, 1, 1 and it's rotation to 90 degrees on the y axis.