local debounce = false
function frameScrollQ()
if debounce == false then
currentFrame = "Leaderboard"
Hotbar.BarSlider:TweenPosition(LeaderboardLocation,"In","Linear",1, true)
Hotbar.Leaderboard.Image = "rbxgameasset://Images/trophy221"
Hotbar.Friends.Image = "rbxgameasset://Images/FriendsListPng"
Friends:TweenPosition(UDim2.new(0,-1000,0,0),"Out", "Sine",1, true)
Hotbar.Status.Text = "Leaderboard"
Leaderboard:TweenPosition(UDim2.new(0,0,0,0),"In","Sine",1, true)
debounce = true
wait(.2)
debounce = false
end
end
ContextActionService:BindAction("ScrollingFrameQ", frameScrollQ, true, "q")
This block of code triggers twice when the q key is pressed, held down, and then let go. I've tried using debouncing, but it doesn't seem to fix my problem. Anyone have a solution to this? Thanks.
