How do i create a debounce in this giver script?
01 | local passId = 389373250 |
02 | local GPS = game:GetService( "GamePassService" ) |
03 | local lighting = game.Lighting |
04 | local hmg = { lighting.HMG, lighting.GHMG } |
06 | script.Parent.Touched:connect( function (part) |
07 | if game.Players:FindFirstChild(part.Parent.Name) then |
08 | local player = game.Players [ part.Parent.Name ] |
09 | if GPS:PlayerHasPass(player, passId) then |
10 | if player.Backpack:FindFirstChild(hmg [ 2 ] .Name) = = nil or player.StarterGear:FindFirstChild(hmg [ 2 ] .Name) = = nil then |
11 | hmg [ 2 ] :Clone().Parent = player.Backpack |
12 | hmg [ 2 ] :Clone().Parent = player.StarterGear |
14 | if player.Backpack:FindFirstChild(hmg [ 1 ] .Name) = = nil and player.StarterGear:FindFirstChild(hmg [ 1 ] .Name) = = nil then |
15 | hmg [ 1 ] :Clone().Parent = player.Backpack |
16 | hmg [ 1 ] :Clone().Parent = player.StarterGear |
I'm trying to make a debounce using this script