Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make this loop?

script.Parent.MouseClick:connect(function(plr)

local c = game.Lighting.Apple:Clone()

c.Parent = plr.Backpack

end)

script.Parent.MouseClick:connect(function(plr)

local c = game.Lighting.Apple:Clone()

c.Parent = plr.Backpack

script.Parent.Parent:remove()

end)

how do i make this happen over and over? every time the tree is clicked i want to have a delay of 2 minutes before the tree to reappears... can u help?

1 comment

0

You may want to put the apple in ServerStorage, it is way more stable.

1 answer

Trees = game.ServerStorage.Trees:GetChildren() -- Put a few trees in server storage


Tree = script.Parent.Parent -- This script would be inside the trunk!
script.Parent.ClickDetector.MouseClick:connect(function()
Tree:Destroy()
wait(120)
c = Trees[math.random(1, #Trees)]
c.Parent = workspace


end)

7 comments

0

it didnt work but ill see if i can get it to work

0

it worked for me

0

does it need to be in a script or a local script

0

Script.... Here is a link to the model I made for you! http://www.roblox.com/Tree-Click-System-For-FastSnail5-item?id=184779369

0

Whoops Let me update it I forgot to clone it!

0

There you go!

0

thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.