Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to add 2 Values on Variable using tweenservice?

i'm trying to put 2 things on tween but idk the problem with my script

its unable to cast value to object is the error..

local TweenService = game:GetService("TweenService")
local part = {LeftHand,RightHand}

local TweeningInformation = TweenInfo.new(
 1,
 Enum.EasingStyle.Quad,
 Enum.EasingDirection.Out,
 0,
 false,
 0
)

local PartProperties = {
 Color = Color3.fromRGB(0,0,0)
}

local Tween = TweenService:Create(part,TweeningInformation,PartProperties)

Tween:Play()

1 answer

✓ Accepted answer

You cannot use :Create() to tween more than one part at a time. You could create a custom function to do it for you but the easiest way around this is to just make two different tweening variables and play them separately.

local Tween1 = TweenService:Create(LeftHand,TweeningInformation,PartProperties)
local Tween2 = TweenService:Create(RightHand,TweeningInformation,PartProperties)

Tween1:Play()
Tween2:Play()

Info on the Create function

This discussion is preserved as it was. New answers, comments, and votes are closed.