I want to make a script that drops 3 copies of the SAME tool when I kill the humanoid. Problem: The dummy is not dropping the 3 tools I want it to.
01 | local dummy = script.Parent |
02 | local dummy 2 = dummy:clone() |
03 | backup = dummy |
04 | log = game.ReplicatedStorage.Tool |
05 |
06 |
07 | local humanoid = backup:FindFirstChild( "Humanoid" ) |
08 |
09 | if humanoid then |
10 | humanoid.Died:connect( function () |
11 | wait( 5 ) |
12 | dummy:Destroy() |
13 | dummy 2. Parent = workspace |
14 | dummy 2 :MakeJoints() |
15 | log:Clone() |
16 | log:Clone() |
17 | log:Clone() |
18 | end ) |
19 | end |
You could use a loop to spawn multiple tools. You also need to set the tool's parent to workspace, and set its starting position to see it. For example, I set the tool's starting position to the dummy's torso position.
01 | local dummy = script.Parent |
02 | local dummy 2 = dummy:clone() |
03 | backup = dummy |
04 | log = game.ReplicatedStorage.Tool |
05 |
06 |
07 | local humanoid = backup:FindFirstChild( "Humanoid" ) |
08 |
09 | if humanoid then |
10 | humanoid.Died:connect( function () |
11 | wait( 5 ) |
12 | dummy:Destroy() |
13 | dummy 2. Parent = workspace |
14 | dummy 2 :MakeJoints() |
15 | for i = 1 , 3 do |
an easier way to do it is by going to linkedsword and check can drop weapon