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~
Make a copy of the tool and put it in ServerStorage. Then put a normal script into the tool and do this:
--This is editied to your preferences you gave me on Roblox local tool = script.Parent tool.AncestryChanged:connect(function() local newTool = game:GetService("ServerStorage"):WaitForChild("name of tool"):Clone() newTool.Parent = workspace newTool.CFrame = CFrame.new(x, y, z) wait(60 * 2) end)
Make sure the tool in server storage also contains this script or else it will only be regenerate once.