code:

local Player = game:GetService("Players").LocalPlayer;
local Backpack = Player:WaitForChild("Backpack");
local Mouse = Player:GetMouse();
local text = "Changing Weapon";
local Character = Player.Character;
local Hum = Character:WaitForChild("Humanoid")

local ChangeWeapon = function()
	print(text);
	local Guns = Backpack:GetChildren();
	for i=1, #Guns do
		Hum:EquipTool(Guns[1]);
	end
end

local ChangeWeapon1 = function()
	print(text);
	local Guns = Backpack:GetChildren();
	for i=-1, #Guns do
		Hum:EquipTool(Guns[1]);
	end
end

Mouse.WheelForward:connect(function()
	ChangeWeapon()
end);


Mouse.WheelBackward:connect(function()
	ChangeWeapon()
end);

^ this code just makes it go to the second gun but then it won't work anymore! HELP! setup: http://prntscr.com/gyqvyk