ok so i tried to add a cooldown to this weapon spawner but it wont work. i bbasically want it that when someone touch it they get the gun from lighting but i want it that after one person touch it the part wont give another gun until cooldown is done. heres is what i tried.
ToolName = "Tool" -- Exact name of the weapon/tool
RespawnTime = 3 -- Respawn time (In seconds)
function onTouched(part)
p = game.Players:playerFromCharacter(part.Parent)
if p == nil then return end
Wep = game.Lighting.Pistol:clone() --Change Sword to the name of your weapons
wait(RespawnTime)
Wep = game.Lighting.Pistol:clone() --Change Sword to the name of your weapons
if p.Backpack:findFirstChild(Wep.Name) ~= nil then return end
Wep.Parent = p.Backpack
end
