local Debounce = false
SoundButton.MouseButton1Click:Connect(function()
if Debounce == false then
Debounce = true
SoundButton.BackgroundColor3 = Color3.fromRGB(81, 245, 120)
SoundButton.Frame.BackgroundColor3 = Color3.fromRGB(64, 195, 95)
print("Debounce Set To True")
wait()
if Debounce == true then
Debounce = false
SoundButton.BackgroundColor3 = Color3.fromRGB(172, 172, 172)
SoundButton.Frame.BackgroundColor3 = Color3.fromRGB(121, 121, 121)
print("Debounce Set To False")
end
end
end)
COMMUNITY QUESTION
I made a gui with a button that changes colors but it is not working how to fix it? [Solved]
1 answer
I fixed the problem i needed to add an else!
This discussion is preserved as it was. New answers, comments, and votes are closed.
