local userinputservice = game:GetService("UserInputService")

userinputservice.InputBegan:Connect(function(input, gameProcessedEvent)
	
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.1
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.2
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.3
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.4
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.5
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.6
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.7
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.8
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 0.9
	wait(1)
	script.Parent.ScreenGui.Frame.BackgroundTransparency = 1
	wait(1)
	
	end)

(this local script is in the StarterGui btw)

1 comment

0

A debounce is just a Boolean Value (Bool Value) that is set to either true or false. Usually, debounces are checked to see if they are false, and if they are then set them to true so when the check happens again it cannot run the code as the debounce would be set to true instead of false.