Input Roblox脚本进入聊天对话框
我需要一个脚本,这样当你按下键盘上的E键时,它就会打开与npc的聊天。我已经在脑袋里有了我想要使用的对话框。我也已经有了当你按下E时检测的代码Input Roblox脚本进入聊天对话框,input,lua,dialog,roblox,Input,Lua,Dialog,Roblox,我需要一个脚本,这样当你按下键盘上的E键时,它就会打开与npc的聊天。我已经在脑袋里有了我想要使用的对话框。我也已经有了当你按下E时检测的代码 game:GetService("UserInputService").InputEnded:Connect(function(input,event) if input.KeyCode == Enum.KeyCode.E then print("Activated") workspace.NPC.Head.Dia
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)
游戏:GetServiceUserInputService.Inputed:Connectfunctioninput,事件
如果input.KeyCode==Enum.KeyCode.E,则
打印激活
workspace.NPC.Head.Dialog.SomeGui.Visible=true-示例
终止
终止
这是行不通的,因为我只想让本地玩家使用它,与服务器无关,但感谢您为此付出的努力help@CrannMoroney我不是100%确定,但它不可能从任何脚本激活对话框。或者,你可以创建一个billboardgui而不是对话框系统。我有一半认为这是问题所在,因为我看不到任何可以启用/禁用对话框的clear属性