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

When I clone my gun into Backpack, the gun spawns on the floor. Help?

Asked by 5 years ago
Edited 5 years ago

Hello,

I am making a game, and I have ran into an issue. When I clone my tool into the backpack, the gun, when equipped isn't in my hand, instead it's on the ground. The gun must have ManualActivationOnly and RequiresHandle as false ( I made the gun using a gun making kit).

I have tried to set it in my script, and when I tried it again, it still didn't work, is there anything wrong in my script that would prevent my gun from working properly?

Here is a GIF of what happens. I equip the first tool ( in starterpack), but when I equip the cloned tool, it doesn't equip, but spawns on the ground.

local plr = game.Players.LocalPlayer
local deploy = script.Parent
local frame = deploy.Parent
local button1 = frame.Choice1box
local button2 = frame.Choice2box

function givetool()
    if button1.TextTransparency == 0 then 
        local tool1 = game.ReplicatedStorage.MP7:Clone()
            tool1.Parent = plr.Backpack
            tool1.ManualActivationOnly = false
            tool1.RequiresHandle = false
        local tool2 = game.ReplicatedStorage.M4A1:Clone()
            tool2.Parent = plr.Backpack
            tool2.ManualActivationOnly = false
            tool2.RequiresHandle = false

    elseif button2.TextTransparency == 0 then
        local tool1 = game.ReplicatedStorage.Boot:Clone()
            tool1.Parent = plr.Backpack
            tool1.ManualActivationOnly = false
            tool1.RequiresHandle = false            
        local tool2 = game.ReplicatedStorage.Cool:Clone()
            tool2.Parent = plr.Backpack
            tool2.ManualActivationOnly = false
            tool2.RequiresHandle = false
    end

    wait(1)
    frame.Visible = false
end

deploy.MouseButton1Click:Connect(givetool)
0
is it welded? magentacrasyguy -7 — 5y
0
Try to weld the handle to the hand of the person. That way every part welded to the handle will move with the hand. That is if everything has been welded to the handle. Good luck with the gun! greenhamster1 180 — 5y
0
ah okay ill try that. tonyv537 95 — 5y

Answer this question