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

Duplicating a tool makes a script in it not work? Why does it do this?

Asked by 4 years ago

I am making a game with a gun shop and the guns have a script in them that makes you hold the gun how I want them to. Yet its not an animation. But whenever I replicate it the script stops working? Can someone please help me. This is the script:

01selected = false
02RSH, LSH = nil, nil
03GRP = nil
04RW, LW = Instance.new("Weld"), Instance.new("Weld")
05anim = "none"
06function WaitForChild(obj, ch_n)
07    local t = time()
08    while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end
09    return obj:FindFirstChild(ch_n)
10end
11script.Parent.Equipped:connect(function()
12    if script.Parent.Parent:FindFirstChild("Humanoid") then
13    if selected then return end
14    selected = true
15    player = game.Players:playerFromCharacter(script.Parent.Parent)
View all 86 lines...
0
I think keep the scripts as the child of your script and place them in after its done? Just maybe TradingForDom 1 — 4y
0
ok Nervousmrmonkey2 118 — 4y
0
it didn't work sorry but thanks for trying to help :D Nervousmrmonkey2 118 — 4y
0
You can try disabling the script inside the tool and reenabling it. DiamondComplex 285 — 4y
View all comments (3 more)
0
already tried that but thanks for anwsering Nervousmrmonkey2 118 — 4y
0
I've already come across this problem before in the past. Can you confirm that there aren't any errors in the output? xxIamInevitable 2 — 4y
0
yeah there arent any Nervousmrmonkey2 118 — 4y

Answer this question