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)

1 comment
You never called
equiporunequip, did you mean to?