I am making a game that opens in an hour "Code Hunters" and I added quests and you find tools. Now I want to make the tools regenerate every 2 minutes after somebody takes it. It does that but only regenerates once when I want it to continuously regenerate. What is wrong with my script?
Here is my script:
local clone = script.Parent.Book:Clone(999999999999999999)
while true do wait(120)
local g = script.Parent:findFirstChild("Book")
if g ~= nil then
else
local o = clone:Clone()
o.Parent = script.Parent
o:MakeJoints()
end
end
Please help~

3 comments
thank you so much! :D
sorry for being a bother, but how do I make it where it respawns 2 minutes after a player takes the item?
I've just edited it for you