Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why's this tweening code gets an error "Unable to cast dictionary"?

Asked by
Cffex 0
3 years ago

The code (server script):

local TweenService = game:GetService("TweenService")
local PickupTweenInfo = TweenInfo.new(
    .3,
    Enum.EasingStyle.Linear,
    Enum.EasingDirection.In,
    0,
    false,
    0)

local FinishingLocation = char.HumanoidRootPart

local Tween = TweenService:Create(item, PickupTweenInfo, {
            Transparency == 1,Size == Vector3.new(0,0,0),CFrame = FinishingLocation
})

Tween:Play()

Can somebody explain and solve this for me?

1 answer

Log in to vote
0
Answered by 3 years ago

HumanoidRootPart must add .CFrame Changed :

local Tween = TweenService:Create(item, PickupTweenInfo, {
Transparency == 1,Size == Vector3.new(0,0,0),CFrame =
FinishingLocation.CFrame
})

Tween:Play()
Ad

Answer this question