Cframe and Tweening Problem

I want to achieve a simple tween. But unfortunately it is not working

  1. it gives out this error " Workspace.Dev_Simphony.Script:7: invalid argument #1 (CFrame expected, got table) "
local remote = game.ReplicatedStorage.RemoteEvent
local TweenService = game:GetService("TweenService")

remote.OnServerEvent:Connect(function(p, player)
	local humr = player.Character.HumanoidRootPart
	local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0)
	local goals = {CFrame = CFrame * CFrame.new(0,0,5)}
	local HumrTween = TweenService:Create(humr, tweenInfo, goals)
	HumrTween:Play()
end)

You’re uh, trying to define & set the CFrame as itself? You didn’t really specify a CFrame constructor, so the goals was expecting something else but ended up as a “table”

	local goals = {CFrame = CFrame.new(0, 0, 0) * CFrame.new(0,0,5)}
2 Likes

lol I just made a stupid mistake. I was not focused on my work. thanks mate