• Я зарабатываю 100 000 RUB / месяц на этом сайте!

    А знаешь как? Я всего-лишь публикую (создаю темы), а админ мне платит. Трачу деньги на мороженое, робуксы и сервера в Minecraft. А ещё на паль из Китая. 

    Хочешь так же? Пиши и узнавай условия: https://t.me/alex_redact
    Реклама: https://t.me/yougame_official

Lua roblox gui help

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
18 Окт 2019
Сообщения
41
Реакции
0
как сделать так, чтобы гуи открывалось при нажатии на клавишу? только мышкой по кнопке получается сделать
  1. Open.MouseButton1Down:connect(function()
  2. Main.Visible = true
  3. OpenFrame.Visible = false
  4. end)
по клавише не могу, всё из интернета перепробовал и не получается почему то. скиньте код плиз
 
localplayer = game.Players.LocalPlayer
mouse = localplayer:GetMouse()

mouse.KeyDown:connect(function(key)
if key == "Клавиша (не заглавные)" then
Main.Visible = true
OpenFrame.Visible = false
end
 
Код:
Expand Collapse Copy
UIS = game:GetService("UserInputService")
Main = game.Players.LocalPlayer.PlayerGui.ScreenGui.Main --//тут путь до MainFrame
OpenFrame = game.Players.LocalPlayer.PlayerGui.ScreenGui.OpenFrame --//а тут до OpenFrame

UIS.InputBegan:connect(function(key)
    if key.KeyCode == Enum.KeyCode.RightShift then --// https://developer.roblox.com/en-us/api-reference/enum/KeyCode там есть все, заменять RightShift
        Main.Visible = not Main.Visible
        if Main.Visible then
            OpenFrame.Visible = false
        elseif not Main.Visible then
            OpenFrame.Visible = true
        end
    end
end)
если нужна еще помощь добавляй в дс Megumin#1258
 
Код:
Expand Collapse Copy
UIS = game:GetService("UserInputService")
Main = game.Players.LocalPlayer.PlayerGui.ScreenGui.Main --//тут путь до MainFrame
OpenFrame = game.Players.LocalPlayer.PlayerGui.ScreenGui.OpenFrame --//а тут до OpenFrame

UIS.InputBegan:connect(function(key)
    if key.KeyCode == Enum.KeyCode.RightShift then --// https://developer.roblox.com/en-us/api-reference/enum/KeyCode там есть все, заменять RightShift
        Main.Visible = not Main.Visible
        if Main.Visible then
            OpenFrame.Visible = false
        elseif not Main.Visible then
            OpenFrame.Visible = true
        end
    end
end)
если нужна еще помощь добавляй в дс Megumin#1258
благодарю
 
localplayer = game.Players.LocalPlayer
mouse = localplayer:GetMouse()

mouse.KeyDown:connect(function(key)
if key == "Клавиша (не заглавные)" then
Main.Visible = true
OpenFrame.Visible = false
end
а как на F2 забиндить? не получается. на F получилось
 
Назад
Сверху Снизу