I am making a hoverboard and I need to have the part always rotating so it is aligned with the rotation of the ground. How would I do this?
So first you wanna find the rotation of the surface, let's call the part under the hoverboard "SurfacePart".
You would use this function to get the part rotation from its CFrame (The "x,y,z" values are the part position, while the other values are the rotation of the part)
local x,y,z,xx,yx,zx,xy,yy,zy,xz,yz,zz = SurfacePart.CFrame:components()
Then you would get the hoverboard CFrame (we will call it "newCFrame") by applying the rotation values to a new CFrame value.
newCFrame = CFrame.new(0,0,0,xx,-yx,-zx,xy,-yy,-zy,xz,-yz,-zz)
Of course you need to apply the board position, else the part will be placed at position (0,0,0). The board position would be called "Position" (Vector3 value)
newCFrame = CFrame.new(0,0,0,xx,-yx,-zx,xy,-yy,-zy,xz,-yz,-zz) + Position
You should read this to learn how CFrame works http://wiki.roblox.com/index.php?title=CFrame