So two problems that I don't know how to address. Each of the buttons that are clicked will change the scrollingGui doesn't work. And when they type in the command bar and then press the "Execute" button it takes what they put then sees if it is one of the commands and if so execute it. But before that can happen it is not even fireing what they put in the command bar. I know I am probably using it wrong, but I am stuck.
local script
---Player thingy
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local char = player.Character
local mouse = player:GetMouse()
---Services
local uis = game:GetService("UserInputService")
--- Guis
local screen = script.Parent
local Cmd = screen.CmdBox
local execute = screen.Run
local maingui = screen.Gui
local mainframe = maingui.Frame
local history = mainframe.ChatHistory
local list = mainframe.AdminList
local Cmds = mainframe.Commands
local history1 = mainframe.ChatHistory1
local list1 = mainframe.AdminList1
local Cmds1 = mainframe.Commands1
local expla = mainframe.Explanation
--Event
local event = screen:WaitForChild("Event")
uis.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.BackSlash then
Cmd:CaptureFocus()
end
end)
history1.MouseButton1Down:connect(function()
print("Good")
history.Visible = true and list.Visible == false and Cmds.Visible == false
print("Sucess")
end)
list1.MouseButton1Down:connect(function()
print("good2")
list.Visible = true and history.Visible == false and Cmds.Visible == false
print("Sucess2")
end)
Cmds1.MouseButton1Down:connect(function()
print("good3")
Cmds.Visible = true and list.Visible == false and history.Visible == false
print("Sucess3")
end)
execute.MouseButton1Down:connect(function()
if Cmd.Text ~= nil then
Cmd.Text:FireServer(Cmd.Text)
end
end)
server script
---Player thingy
local player = script.Parent.Parent.Parent
repeat wait() until player.Character
local char = player.Character
---Services
--- Guis
local screen = script.Parent
local Cmd = screen.CmdBox
local execute = screen.Run
local maingui = screen.Gui
local mainframe = maingui.Frame
local history = mainframe.ChatHistory
local list = mainframe.AdminList
local Cmds = mainframe.Commands
local history1 = mainframe.ChatHistory1
local list1 = mainframe.AdminList1
local Cmds1 = mainframe.Commands1
local expla = mainframe.Explanation
--Event
local event = screen:WaitForChild("Event")
--- Admins
local admins = {["Player1"] = true, ["Player"] = true, ["yougottols1"] = true, ["Cyber_Monkey"] = true}
event.OnServerEvent:connect(function(plyr, Trying)
print("Fired")
end)
