CFrame Physics Rotation Problem

Hey guys. I’m trying to make a rotating cube using CFrame. I got the cube to rotate, but it slides out from under the player. If the cube starts rotating, the player doesn’t rotate with it. Is there a way to make the player move with the cube? I’ve tried using Angular Velocity and Linear Velocity without CFrame but I’ve had many problems with that. Thanks guys!

local TweenService = game:GetService("TweenService")

local timeToRotate = NumberRange.new(7,8)
local rotateRange = NumberRange.new(25)
local tweenStyle = Enum.EasingStyle.Linear

local Model = script.Parent
local CFrameValue = Instance.new("CFrameValue") 

CFrameValue.Value = script.Parent:GetPrimaryPartCFrame()

CFrameValue.Changed:Connect(function()
    Model:SetPrimaryPartCFrame(CFrameValue.Value)
end)

while true do
    local info = TweenInfo.new(math.random(timeToRotate.Min,timeToRotate.Max),tweenStyle)
    local goal = {Value = Model:GetPrimaryPartCFrame()*CFrame.Angles(
        math.rad(math.random(rotateRange.Min,rotateRange.Max)),
        math.rad(math.random(rotateRange.Min,rotateRange.Max)),
        math.rad(math.random(rotateRange.Min,rotateRange.Max))
        )}
    
    local Tween = TweenService:Create(CFrameValue,info,goal)
    Tween:Play()
    Tween.Completed:Wait()
end

As stated in so many previous posts on the forum, CFramed items are not physics based. They are basically skipping from CFrame to CFrame.
You need a Constraint based system for the best results.
For a single rotation you can just use a HingeConstraint.

If you need multiple rotations on axes you could try a Ball & Socket constraint, but I’m not sure the rotations can be controlled.
You could put 2 HingeConstraints and their Attachments at the same Position but attached to an ‘intermediate’ Part. You’d need 1 Hinge from an Anchored Part or baseplate to the ‘intermediate’ Part so it can rotate in one direction, then put another Hinge from the ‘intermediate’ Part to the Cube but align those 2 Attachments 90 degrees to the first Hinge Attachements.