Going to keep this short, but basically I’m trying to tween numeric object values but I keep getting an “Unable to cast value to Object” error. This is the line of code I used:
TS:Create(block, TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Radius = numberValue}):Play()
-- block is the object, and Radius is an attribute of it.
This is the object constructor used to create the block object specified earlier:
local function ConstructBlock(plr, color, radius, sineRatio)
local Block = {
-- Attributes
Part = genBlock;
Color = color;
Radius = radius;
SineRatio = sineRatio;
Root = workspace:FindFirstChild(plr.Name.." Parts").BlockRoot;
Owner = plr.Character;
table.insert(Parts, Block)
return Block
end