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でオブジェクトに文字を表示する方法【BillboardGuiとSurfaceGui】

Posted at

オブジェクトの文字を表示する方法(常にプレイヤーへ向くバージョン)

このようにする場合
image.png

Partを追加します。
image.png

Partに、BillboardGuiを追加します。
image.png

BillboardGuiに、TextLabelを追加します。
image.png

TextLabelのプロパティ

BackgroundTransparencyを1にすると、Textの背景色が透明になります。
image.png

TextScaledにチェックを入れると、TextLabelの大きさに合わせて、文字の大きさがリサイズされます。
image.png

Textに文字を入力すると、TextLabelに、入力された文字が表示されます。
image.png

BillboardGuiのプロパティ

AlwaysOnTopのチェックを入れると、オブジェクトの前面に文字が表示されます。
image.png

これらを設定すると...

このようになりました。
image.png

オブジェクトの文字を表示する方法(看板のようなバージョン)

このようにする場合
image.png

Partを追加します。
image.png

Partに、SurfaceGuiを追加します。
image.png

SurfaceGuiに、TextLabelを追加します。
image.png

TextLabelのプロパティ

BackgroundTransparencyを1にすると、Textの背景色が透明になります。
image.png

TextScaledにチェックを入れると、TextLabelの大きさに合わせて、文字の大きさがリサイズされます。
image.png

Textに文字を入力すると、TextLabelに、入力された文字が表示されます。
image.png

SurfaceGuiのプロパティ

AlwaysOnTopのチェックを入れると、オブジェクトの前面に文字が表示されます。
image.png

これらを設定すると...

このようになりました。
image.png

まとめ

BillboardGuiを使えば常にプレイヤーへ向くラベル、SurfaceGuiを使えば看板のようなラベルを簡単に実装できます。用途に応じて使い分けることで、ゲーム演出の幅が広がります。

関連記事

60秒で作る!プレイヤーを追いかけるPart

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?