Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My button is flashing? There is not error. Placeholder

Asked by 4 years ago

As usual, My script IS NOT WORKING! I want to do this fast, And the only information i can provide with is:The button is flashing Green,Then yellow, then Dark green,Then orange, Then black, Then red.

Part = script.Parent
clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = Part 
tweeningInformation = TweenInfo.new(
5, --Length
Enum.EasingStyle.Linear, --Easing style
Enum.EasingDirection.Out, --
0, --Repeat
true, --Repeat?
1 --Delay
)
partProperties = {
    Color = Color3.new(255, 0, 0)
}
Tween1 = TS:Create(Part,tweeningInformation,partProperties)
function onClicked()
Tween1:play()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Please explain why. I am getting answers i dont understand and i want good answers.

1 answer

Log in to vote
2
Answered by
Alphexus 498 Moderation Voter
4 years ago

Change Color3.new to Color3.fromRGB as Color3.new expects values from 1-0 while you are giving it RGB values.

0
Ill try it hasanchik 49 — 4y
Ad

Answer this question