local UIS = game:GetService('UserInputService')
local Player = game.Players.LocalPlayer
local Character = Player.Character
local debounce = false
local cooldown = 10 ----- what i tried but it didn't work
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
Color = (Instance.new("ColorCorrectionEffect"))
Color.Name = "BlackAndWhite"
Color.Brightness = 0
Color.Contrast = 0
Color.Enabled = true
Color.Saturation = -1
Color.TintColor = Color3.fromRGB(255,255,255)
Color.Parent = game.Lighting
local Anim = Instance.new('Animation')
Anim.AnimationId = 'rbxassetid://04575842023'
PlayAnim = Character.Humanoid:LoadAnimation(Anim)
PlayAnim:Play()
wait(10)
Color:remove()
end
end)
PlayAnim:Stop()
World.OnClientEvent:Connect(function()
wait(cooldown) --- sill didn't work
debounce = false
end)
i tried to give this a cooldown and tried to give it a 10 seconds cooldown but it didn't work pls help
