Workspace.Part.Script:3: invalid argument #1 (CFrame expected, got table)

I wanted to make a spinning part but for some reason it gives me the error
“Workspace.Part.Script:3: invalid argument #1 (CFrame expected, got table)”
How can i fix it?

Heres the script

local TweenService = game:GetService("TweenService")
while wait() do
	TweenService:Create(script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear),{CFrame * CFrame.Angles(15,0,0)}):Play()
end

Thanks in advance.

You need to first get the cframe property of the part first before passing it in the table. Example:

local TweenService = game:GetService("TweenService")
while wait() do
    local Cframe = script.Parent.CFrame
	TweenService:Create(script.Parent,TweenInfo.new(1,Enum.EasingStyle.Linear),{CFrame = Cframe * CFrame.Angles(15,0,0)}):Play()
end
3 Likes