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

How do i loop this 2 times?

Asked by 10 years ago

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

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

c.Parent = plr.Backpack

end

i need this to happen twice but i dont know how to loop

1 answer

Log in to vote
2
Answered by 10 years ago

Try this:

for i=1, 2 do
local c = game.Lighting.Apple:clone()
c.Parent = plr.Backpack --make sure you have plr defined
end
0
should i put it in a local script or something? FastSnail5 8 — 10y
1
No, it doesn't matter what script you put it in. As long as the code I gave you is the entire script. bobafett3544 198 — 10y
Ad

Answer this question