0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

robloxでassistant その178

Posted at

概要

robloxでassistant、やってみた。
練習問題やってみた。

練習問題

Dialog,DialogChoiceを使え。

写真

image.png

サンプルコード



local character = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait()
local Players = game:GetService("Players")
local player = Players.LocalPlayer
player.Character.Archivable = true
local clone = player.Character:Clone()
player.Character.Archivable = false
clone.Name = "npc"
clone.Parent = workspace
clone.PrimaryPart.CFrame = CFrame.new(0, 0, -10)
local dialog = Instance.new("Dialog")
dialog.Name = "MyDialog"
dialog.InitialPrompt = "剣は、欲しいですか"
dialog.DialogChoiceSelected:Connect(function(player)
	print("OKです")
end)
dialog.Parent = clone.Head
local choice1 = Instance.new("DialogChoice")
choice1.Name = "Choice 1"
choice1.UserDialog = "はい"
choice1.ResponseDialog = "OK"
choice1.Parent = dialog


以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?