Hello, I'm A Beginner In Scripting And I'm Making A Simulator Game And I'm Making A Script And I Don't Know How To Add A Cooldown In Here So Could Anyone Do It?
local Players = game:GetService("Players")
local sword = game.ReplicatedFirst.ClassicSword
local part = script.Parent
local function onTouched(part)
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then return end
local backpack = player.Backpack
sword:Clone().Parent = backpack
end
part.Touched:Connect(onTouched)
Disclaimer : This Is A Repost

1 comment
use debounce