---Services
local uis = game:GetService("UserInputService")
local ts = game:GetService("TweenService")
local debounce = false
local opened = false
---Variables
local plr = game.Players.LocalPlayer
local Menu = plr.PlayerGui:WaitForChild('Menu')
local Map = Menu.Map
local Message = Menu.Message
local Party = Menu.Party
local Settings = Menu.Settings
local Players = Menu.Players
---Tweening
local ImageTable = {
["WhitePlayers"] = "http://www.roblox.com/asset/?id=234371711",
["OrangePlayers"] = "http://www.roblox.com/asset/?id=234371753",
["WhiteMap"] = "http://www.roblox.com/asset/?id=234371628",
["OrangeMap"] = "http://www.roblox.com/asset/?id=234371381",
["WhiteParty"] = "http://www.roblox.com/asset/?id=234371793",
["OrangeParty"] = "http://www.roblox.com/asset/?id=234371820",
["WhiteMessage"] = "http://www.roblox.com/asset/?id=234371839",
["OrangeMessage"] = "http://www.roblox.com/asset/?id=234371864",
["WhiteSettings"] = "http://www.roblox.com/asset/?id=234371004",
["OrangeSettings"] = "http://www.roblox.com/asset/?id=234371131"
}
local TweenTable = {
["Settings"] = UDim2.new(2.6, 0,2, 0),
["Players"] = UDim2.new(2.6, 0,2, 0),
["Map"] = UDim2.new(2.6, 0,1.3, 0),
["Party"] = UDim2.new(2.6, 0,2, 0),
["Message"] = UDim2.new(3.8, 0,3, 0),
["Arrow"] = UDim2.new(0, -6 , 0, 13),
["Info"] = UDim2.new(3.5, 0 , 5, 0)
}
local TweenTable2 = {
["Settings"] = UDim2.new(0, 0,2, 0),
["Players"] = UDim2.new(0, 0,2, 0),
["Map"] = UDim2.new(0, 0,1.3, 0),
["Party"] = UDim2.new(0, 0,2, 0),
["Message"] = UDim2.new(0, 0,3, 0),
["Arrow"] = UDim2.new(0, 0,0, 13),
["Info"] = UDim2.new(0, 0, 5 , 0)
}
local TweenTable3 = {
["Settings"] = UDim2.new(0.404, 0,1.055, 0),
["Players"] = UDim2.new(0.404, 0,0.255, 0),
["Map"] = UDim2.new(0.404, 0,0.855, 0),
["Party"] = UDim2.new(0.404, 0,0.455, 0),
["Message"] = UDim2.new(0.404, 0,0.655, 0),
["Arrow"] = UDim2.new(0, 0,0, 13),
["Info"] = UDim2.new(0, 0, 5 , 0)
}
uis.InputBegan:Connect(function(key, gameEvent)
if key.KeyCode == Enum.KeyCode.Tab then
if debounce == false then
debounce = true
if opened == false then
opened = true
Players:TweenPosition(UDim2.new(0.465, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .95)
Party:TweenPosition(UDim2.new(0.465, 0, 0.2, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .85)
Message:TweenPosition(UDim2.new(0.465, 0, 0.4, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .65)
Map:TweenPosition(UDim2.new(0.465, 0, .6, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .45)
Settings:TweenPosition(UDim2.new(0.465, 0, .8, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .15)
script.Menu:Play()
game.ReplicatedStorage.SwordArtRemotes.Menu:FireServer(true)
else
opened = false
Players:TweenPosition(UDim2.new(0.465, 0, -1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .5)
Party:TweenPosition(UDim2.new(0.465, 0, -1.2, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 1)
Message:TweenPosition(UDim2.new(0.465, 0, -1.4, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 1.5)
Map:TweenPosition(UDim2.new(0.465, 0, -1.6, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 2)
Settings:TweenPosition(UDim2.new(0.465, 0, -1.8, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 2.5)
for i,v in pairs(Menu:GetChildren()) do
if v:IsA("ImageButton") then
v.IsOpen.Value = false
v.Image = ImageTable["White"..v.Name]
end
end
script.Menu2:Play()
game.ReplicatedStorage.SwordArtRemotes.Menu:FireServer(false)
end
wait(2.5)
debounce = false
end
end
end)
--Stuff
--Players.Image = ("http://www.roblox.com/asset/?id=234371753")
--Players.Image = ("http://www.roblox.com/asset/?id=234371711")
--Map.Image = ("http://www.roblox.com/asset/?id=234371381")
--Map.Image = ("http://www.roblox.com/asset/?id=234371628")
--Message.Image = ("http://www.roblox.com/asset/?id=234371864")
--Message.Image = ("http://www.roblox.com/asset/?id=234371839")
--Party.Image = ("http://www.roblox.com/asset/?id=234371820")
--Party.Image = ("http://www.roblox.com/asset/?id=234371793")
--Settings.Image = ("http://www.roblox.com/asset/?id=234371131")
--Settings.Image = ("http://www.roblox.com/asset/?id=234371004")
--Settings {0, 260},{0, 200}
--Players {0, 260},{0, 200}
--Map {0, 260},{0, 130}
--Message {0, 380},{0, 300}
--Party {0, 260},{0, 200}
--Map2 {0.404, 0},{0.855, 0}
--Message2 {0.404, 0},{0.655, 0}
--Party2 {0.404, 0},{0.455, 0}
--Players2 {0.404, 0},{0.255, 0}
--Settings2 {0.404, 0},{1.055, 0}
local debounce = false
for i,v in pairs(Menu:GetChildren()) do
if v:IsA("ImageButton") or v:IsA("ImageLabel") then
v.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
Menu.Sounds.Select:Play()
if v.IsOpen.Value == false then
v.IsOpen.Value = true
v.Image = ImageTable["Orange"..v.Name]
v.Frame:TweenSize(TweenTable[v.Name], Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .2, true)
v.Info:TweenSize(TweenTable[v.Name], Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .2, true)
if v.Name == ("Players") then
print("Good but epic epic")
v.ImageButton:TweenPosition(TweenTable3[v.Name], Enum.EasingDirection.InOut, Enum.EasingStyle, .2, true)
end
wait(.8)
for i,c in pairs(Menu:GetChildren()) do
if c.Name ~= v.Name and c:IsA("ImageButton") then
c.Image = ImageTable["White"..c.Name]
c.IsOpen.Value = false
c.Frame:TweenSize(TweenTable2[c.Name], Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .2, true)
end
end
else
v.Frame:TweenSize(TweenTable2[v.Name], Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .2, true)
v.Info:TweenSize(TweenTable2[v.Name], Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, .2, true)
v.IsOpen.Value = false
v.Image = ImageTable["White"..v.Name]
end
wait(.3)
debounce = false
end
end)
end
end
Im just starting and I don't really understand how to filter out "Players" which is in a table but it won't tween everything else.

4 comments
Can you properly indent your code ?
btw you are doing
TweenTable[v.Name]which is a table you didnt include in this scriptalso can you explain what you are trying to achieve
So Players is an Image button that when you press it there is supposed to be another tab on the side called info, but info is really big so I wanted to make the entire GUI tween into another position where Info was viewable