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?

More than 1 year has passed since last update.

robloxでassistant その2

Last updated at Posted at 2024-05-01

概要

robloxでassistantやってみた。

質問

テキストボックスを表示したい

回答

Roblox 作品にテキストボックスを表示するには、次の手順に従います。

1.Explorer ウィンドウで StarterGui を選択し、ScreenGui を追加します。
2.StarterGui の上にマウスを置き、+ボタンをクリックします。コンテキストメニューが表示されます。
3.ScreenGui を挿入します。
4.新しい ScreenGui を選択し、TextBox を追加します。
5.ScreenGui の上にマウスを置き、+ボタンをクリックします。コンテキストメニューが表示されます。
6.テキストボックスを挿入します。

これにより、画面にテキストボックスが追加されます。エクスペリエンスの美しさに合わせて、BackgroundColor3、BorderMode、Transparency、Rotation などのプロパティをカスタマイズできます。

パーツの面にテキストボックスを表示したい場合は、次の手順に従います。

1.Explorer ウィンドウで StarterGui を選択し、SurfaceGui を追加します。
2.StarterGui の上にマウスを置き、+ボタンをクリックします。コンテキストメニューが表示されます。
3.ScreenGui を挿入します。
4.新しい SurfaceGui を選択し、TextBox を追加します。
5.SurfaceGui の上にカーソルを置き、+ボタンをクリックします。コンテキストメニューが表示されます。
6.テキストボックスを挿入します。
7.TextBoxを表示したい部分にSurfaceGuiを飾ります。
8.[プロパティ] ウィンドウで、Adornee プロパティを選択します。カーソルが変わります。
9.Explorer ウィンドウでパーツを選択します。
TextBox が表示されない場合は、SurfaceGui の Face プロパティで別の面を選択してみてください。

ユーザーが TextBox を操作するときに TextBox が実行するアクションをスクリプト化することもできます。
たとえば、FocusLost イベントに接続して、ユーザーが Enter ボタンを押したとき、または TextBox の外側をクリックしたときに、TextBox の内容を印刷できます。スクリプトの例を次に示します。

local textBox = script.Parent
local function onFocusLost(enterPressed, inputObject)
if enterPressed then
print(textBox.Text)
end
end
textBox.FocusLost:Connect(onFocusLost)

これがお役に立てば幸いです!さらにご質問がございましたらお知らせください。

以上。

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?