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

I made an Auto Equip Tool script, it runs through, but won't do anything. Why?

Asked by
thePyxi 179
9 years ago

Here is the script.

local player = game.Players.Player
local character = player.Character
local tool = player.Backpack.M4

function equip(tool)
    tool.Parent = character
end

function unequip(tool)
    tool.Parent = player.Backpack
end

SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

Entire Script.

bin = script.Parent
move = script.Parent.Parent.Parent

function Click(Player)
    if script.Parent.Parent.Parent.Parent.GunSelector.Value == "M4" then
        game.Lighting.M4:Clone().Parent = game.Players.LocalPlayer.Backpack

        local player = game.Players.LocalPlayer
        local character = player.Character
        local tool = player.Backpack.M4
        function equip(tool)
            tool.Parent = character
        end
        game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
        move:Destroy()
print("Entered")    
end

bin.MouseButton1Click:connect(Click)
0
You never called `equip` or `unequip`, did you mean to? BlueTaslem 18071 — 9y

Answer this question