So, I wanted to make tweening the character's LowerTorso 30 studs forward. It shall tween when a LocalScript fires an event which is child of the script called ForceA. But it keeps saying an error message "Unable to cast Dictionary" in the output. The script for tweening is in the StarterCharacterScripts.
The TweenInfo I have used is:
local tweeninfo = TweenInfo.new(
5,Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0)
When a LocalScript fires the ForceA event under the script, the character is supposed to tween 30 studs forward. The LowerTorso has joints that can move the full character. Instead it shows the error message.
It says the error is caused on line 5 of the function code below:
local lowertorso = Script.Parent.LowerTorso
script.ForceA.OnServerEvent:Connect(function()
local movingpos = lowertorso.CFrame * CFrame.new(0, 0, -30)
local tween = TweenService:Create(lowertorso, tweeninfo, movingpos)
tween:Play()
end
I have used LookVector() property and I am pretty sure it's a CFrame position. Please help me out for this. I need this so much.

1 comment
Your "Script" should be "script" and i not sure if it is also because the Torso has not loaded in. So, try :WaitForChild("LowerTorso") to make sure that the torso has successfully loaded before going to the other lines of codes.