Unable to cast value to object, UI Tween

So I’m trying to make a simple text transparency tween, but everytime I run their function I get “Unable to cast value to object”

my script
function Text6()
local tweenInfo = TweenInfo.new(Duration)
local Tween = TweenService:Create(Text6, tweenInfo, {TextTransparency = TargetTransparency})
Tween:Play()
end

Is TargetTransparency just a number?
not sure but i think something’s wrong with it, since everythin else seems fine

Yeah, TargetTransparency equals to 0

You are trying to Tween the function Text6…you have to put an instance variable in there.

On the first argument of TweenService:Create you’re using ‘Text6’ which you’ve just defined as a function, It’s conflicting there

Just realized that before I saw your reply, lol.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.