Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

(3rd Time!) How do I edit this Regenerate tool script?

Asked by 7 years ago

****This is the third time the first time someone helped, but it duplicated itself like 15 times and made my game laggy! Second time nobody replied. Please Help!

On my game Code Hunters my script for my tool regeneration keeps regenerating, but not after somebody takes it like I want! Please help me make it where when a Robloxian takes it the tool regenerates!

Scripts!

Before:

local clone = script.Parent.Torch:Clone(999999999999999999)
while true do wait(120)
    local g = script.Parent:findFirstChild("School Book")
    if g ~= nil then

    else
        local o = clone:Clone()
        o.Parent = script.Parent
        o:MakeJoints()
    end
end 

After:

local tool = script.Parent
while true do 
        local newTool = game:GetService("ServerStorage"):WaitForChild("Glasses"):Clone()
        newTool.Parent = workspace
        newTool.CFrame = CFrame.new(x, y, z)
    wait(120 * 2)

end
0
Bind the cloning to a function that checks when the tool is no longer in the workspace. RubenKan 3615 — 7y
0
Does it throw an error? Lord_Hagenost 40 — 7y
0
How? Goldenkings11 -11 — 7y

Answer this question