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
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
Try this:
for i=1, 2 do
local c = game.Lighting.Apple:clone()
c.Parent = plr.Backpack --make sure you have plr defined
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
should i put it in a local script or something?
No, it doesn't matter what script you put it in. As long as the code I gave you is the entire script.