Hi,
I have a script parented to ObjectValue which represents selected button. This script is marking the button that player pressed by tweening its color to red (and back to white when other is pressed) but there’s a wierd error with BackgroundColor:
script.Parent.Changed:Connect(function(newValue)
local appearing = TweenService:Create(newValue, TInfo, {["BackgroundColor"] = Color3.fromHSV(1, 1, 1)})
appearing:Play()
script.Parent.Changed:Wait()
local disappearing = TweenService:Create(newValue, TInfo, {["BackgroundColor"] = Color3.fromHSV(0, 0, 1)})
disappearing:Play()
end)
I didn’t know BackgroundColor
existed, I always thought it was BackgroundColor3
.
2 Likes
4667hp
(Account Info)
June 27, 2022, 8:44pm
#3
try this
script.Parent.Changed:Connect(function(newValue)
local appearing = TweenService:Create(newValue, TInfo, {BackgroundColor3 = Color3.fromHSV(1, 1, 1)})
appearing:Play()
script.Parent.Changed:Wait()
local disappearing = TweenService:Create(newValue, TInfo, {BackgroundColor3 = Color3.fromHSV(0, 0, 1)})
disappearing:Play()
end)
I have not tested it
1 Like
Forummer
(Forummer)
June 28, 2022, 1:15pm
#4
It’s deprecated and hidden from the properties window but it’s still operational and expects a BrickColor value not a Color3 value.
1 Like