local BindableEvent = game.ReplicatedFirst:WaitForChild("Clickable")
local Debounce = true
BindableEvent.Event:Connect(function()
Debounce = false
end)
if not Debounce then
function onClicked()
Game.Workspace.TalentPack.Lighting.Buz3.BrickColor = BrickColor.new("Bright red")
Game.Workspace.TalentPack.Lighting.Buz4.BrickColor = BrickColor.new("Bright red")
Game.Workspace.TalentPack.Lighting.Buz9.BrickColor = BrickColor.new("Bright red")
Game.Workspace.TalentPack.Lighting.Buz10.BrickColor = BrickColor.new("Bright red")
game.Lighting.Ambient=Color3.new(1,0,0)
Debounce = true
wait(3)
game.Lighting.Ambient=Color3.new(0,0,0)
end
script.Parent.ClickDetector.MouseClick:connect (onClicked)
COMMUNITY QUESTION
I am trying to make a button only work when a bindable event fires but it does not work?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
