Here is a tool spawn script that spawns a tool from a part. It continually spawns a tool every 120 seconds but how do I make it so a tool spawns only after it was picked up then with the spawn time of 120 seconds?
local respawnTime = 120
function spawnWeapon()
math.randomseed(math.random(1,255))
local tools = game:GetService("ReplicatedStorage"):WaitForChild("Tools"):GetChildren()
local toolClone = tools[math.random(1,#tools)]:Clone()
toolClone.Parent = workspace.Items
toolClone.CFrame = script.Parent.CFrame + Vector3.new(0,-4,-2)
end
while wait(respawnTime) do
spawnWeapon()
end

1 comment
THX!