How do I make a part rotate like this?

How would I make a part rotate in random directions with tween service for a certain amount of time?

And not just rotate once, rotate in random directions until lets say after 5 seconds

local timee = 0
while timee <= 5 do
wait(1)
    game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(.9),{CFrame = script.Parent.CFrame * CFrame.Angles(math.rad(math.random(1,120)),math.rad(math.random(1,120)),math.rad(math.random(1,120))}:Play()
    timee += 1
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.