✓ Accepted answer
I wouldn't recommend using CFrame and Vector3 properties and constructors together. I would choose one or the other. I prefer CFrame because Vector3 properties have a built-in collision check, and it checks whether or not the part will go through another part.
If the part does go through another part, then the former part will be placed on the area without any chance of colliding with other bricks on top.
Vector3
while wait(0.1) do
YValue = script.Parent.Rotation.y
script.Parent.Rotation = Vector3.new(0, YValue + 1, 0)
end
CFrame
Use the Angles method.
while wait(0.1) do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, math.rad(1), 0)
end
I would recommend using it's own CFrame, then 'add' (or multiply) the angles of its CFrame by it.
Notice how I used the math function "math.rad()". That is because CFrame is in radians, and I find it a lot easier to convert my intended degrees as the argument for the rad method.