首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用于进入对话对话的Roblox脚本

用于进入对话对话的Roblox脚本
EN

Stack Overflow用户
提问于 2020-03-14 03:50:57
回答 1查看 437关注 0票数 0

我需要一个脚本,以便当你按下键盘上的E,它将打开与全国人民代表大会的聊天,我已经有一个对话框在头脑中,我想使用。我也已经有了检测你按下E键的代码。

代码语言:javascript
复制
game:GetService("UserInputService").InputEnded:Connect(function(input,event)
    if input.KeyCode == Enum.KeyCode.E then
        print("Activated")
        workspace.NPC.Head.Dialog.InUse = true --This is the code I expect to open up the dialog.
    end
end)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-15 04:02:09

代码语言:javascript
复制
game:GetService("UserInputService").InputEnded:Connect(function(input,event)
    if input.KeyCode == Enum.KeyCode.E then
        print("Activated")
        workspace.NPC.Head.Dialog.SomeGui.Visible= true -- example
    end
end)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60676505

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档