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

Cloning multiple items?

Asked by 11 years ago

So I wrote my script as an inventory pick up script. When I pick up ammo it adds the correct amount to the ammo value but when I pick up an object, it clones multiple items into my inventory.

01char = script.Parent
02torso = char:findFirstChild("Torso")
03player = game.Players.LocalPlayer
04control = player.Control
05text = player.PlayerGui.Cam.BlackOut.Interact
06resources = game.Lighting.Resources
07mouse = player:GetMouse()
08stats = player:findFirstChild("Player Stats")
09inventory = stats.Inventory
10maxdistance=10
11grabbable = nil
12select = player.PlayerGui.Cam.LookAt
13 
14function Distance(target)
15    local p = target.CFrame.p
View all 73 lines...

1 answer

Log in to vote
0
Answered by 11 years ago

How many items does it duplicate? When you pick up something, does it only give you 1 extra, or 25 extra?

This is vital information we need to know in order to answer.

0
That's just it, it's always a random amount. It could be 5 or it could be 20. soaprocks2 75 — 11y
Ad

Answer this question