Roblox脚本:进入对话聊天

我需要一个脚本,当你按下键盘上的 E 键时,它将与已经存在的 NPC 打开聊天对话框。我已经有了想要使用的头部内对话的对话框。我也已经有了当你按下E时检测的代码。

game:GetService("UserInputService").InputEnded:Connect(function(input,event)
    if input.KeyCode == Enum.KeyCode.E then
        print("Activated")
        workspace.NPC.Head.Dialog.InUse = true --这是我希望打开对话框的代码。
    end
end)
点赞
用户12839543
用户12839543
游戏:GetService(“UserInputService”)。InputEnded:Connect(function(input,event)
    如果输入KeyCode == Enum.KeyCode.E then
        print(“已激活”)
        工作区。NPC.Head.Dialog.SomeGui.Visible = true - 例子
    end
end)
2020-03-14 20:02:08