I don’t know if its possible, but I’m trying to change a TextColor3 form a surfaceGUI.Textlabel (Textlabel = TrainingRoomTextChange) with a tween, but I get this error: Unable to cast value to Object
local TweeningInfoColorChange1= TweenInfo.new(
.3,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out
)
local BlueToRedColorChange2 = {
Color = Color3.new(255,0,0)
}
local RedToBlueColorChange2 = {
TextColor3 = Color3.new(0, 170, 255)
}
local function COLORCHANGEBtoR()
for _, v in pairs(workspace:GetDescendants()) do
if v:FindFirstChild("TrainingRoomTextChange") then
local ColorChange1BlueToRed = TweenService:Create(v.TrainingRoomTextChange.TextColor3,TweeningInfoColorChange1,BlueToRedColorChange2)
local ColorChange1RedToBlue = TweenService:Create(v.TrainingRoomTextChange.TextColor3,TweeningInfoColorChange1,RedToBlueColorChange2)
ColorChange1BlueToRed:Play()
end
end
end
local function COLORCHANGERtoB()
for _, v in pairs(workspace:GetDescendants()) do
if v:FindFirstChild("TrainingRoomTextChange") then
local ColorChange1BlueToRed = TweenService:Create(v.TrainingRoomTextChange.TextColor3,TweeningInfoColorChange1,BlueToRedColorChange2)
local ColorChange1RedToBlue = TweenService:Create(v.TrainingRoomTextChange.TextColor3,TweeningInfoColorChange1,RedToBlueColorChange2)
ColorChange1RedToBlue:Play()
end
end
end
COLORCHANGERtoB()