字幕表 動画を再生する
This video will show you
このビデオで紹介するのは
how to make a sword on Roblox.
Robloxで剣を作る方法。
Insert parts using the part button
パーツボタンでパーツを挿入する
and design your sword to your liking.
を、自分好みの剣にデザインすることができます。
We're going to design a simple sword
シンプルな剣をデザインする
using parts and wedge parts.
パーツやウェッジパーツを使って
Once you've finished creating your sword,
剣の作成が完了したら
insert a part and name it Handle.
を挿入し、Handleと名付ける。
Make sure it has a capital H
大文字のHであることを確認する
and scale the part down to be small.
で、その部分を小さくスケールダウンする。
Move your handle to where you want the player
ハンドルをプレイヤーのいる場所に移動させる
to hold your sword.
剣を持つために
Now select all of your parts
ここで、すべてのパーツを選択します
and ensure that the anchored property is set to unchecked.
をクリックし、anchoredプロパティがuncheckedに設定されていることを確認します。
Click on the plus icon in the workspace
ワークスペースのプラスアイコンをクリックする
and insert a tool object.
をクリックし、ツールオブジェクトを挿入します。
Select your parts and drag them into the tool.
パーツを選択し、ツールにドラッグします。
Again, make sure that the handle part
もう一度、ハンドル部分を確認する
is spelled correctly and has a capital H,
はスペルが正しく、大文字のHが入ります。
otherwise the tool will not work.
を選択しないと、ツールは動作しません。
Now we need to weld all of the parts together
あとは、すべてのパーツを溶接していきます
so that the sword doesn't fall apart.
剣がバラバラにならないように。
Click the plus icon on the handle
ハンドルにあるプラスアイコンをクリック
and insert a WeldConstraint.
を作成し、WeldConstraintを挿入します。
Set the Part0 property to the handle
ハンドルにPart0プロパティを設定する
and set the Part1 property to one of the other parts.
を作成し、Part1プロパティに他のパーツのいずれかを設定します。
Repeat this step until you've set up WeldConstraints
WeldConstraintsを設定するまで、このステップを繰り返してください。
which connect the handle to every other part.
ハンドルと各パーツをつなぐ
Make sure Part0 is the handle on every weld.
すべての溶接でPart0がハンドルであることを確認します。
Now ensure that your sword is the correct size
剣のサイズが合っていることを確認する
relative to a Roblox character.
Robloxのキャラクターとの相対的な関係。
You can do this by inserting an NPC character
NPCキャラクターを挿入することで可能です
via the plugins, rig builder menu,
をプラグイン、リグビルダーメニューから選択します。
or by inserting an NPC from the toolbox.
またはツールボックスからNPCを挿入してください。
Change the size of your sword
剣の大きさを変える
by selecting the tool object,
ツールオブジェクトを選択することで
then by selecting the scale tool.
を選択し、スケールツールを選択します。
Name your sword by selecting the tool
ツールを選択して剣に名前をつける
and changing the name property in the properties panel.
をクリックし、プロパティパネルのnameプロパティを変更します。
Drag the sword into the starter pack
スターターパックの中に剣をドラッグする
and then click the play button.
をクリックし、再生ボタンをクリックします。
Select your sword in the toolbar to equip it.
ツールバーで剣を選択すると、剣を装備できます。
If your sword is not rotated correctly,
剣が正しく回転していない場合。
close the test session, select the handle again,
テストセッションを終了し、再度ハンドルを選択します。
and then press control + R, or command + R on Mac,
をクリックし、control + R、またはMacではcommand + Rを押してください。
to rotate by 90 degrees.
で90度回転させます。
Now that we've created our sword,
さて、剣を作成しました。
we can script it to kill other players.
他のプレイヤーを殺すようにスクリプトを組むことができるのです。
Insert a script into the tool.
ツールにスクリプトを挿入する。
Inside this script, we are writing code to kill the player.
このスクリプトの中に、プレイヤーを殺すためのコードを書いています。
We detect when the sword touches another object,
剣が他の物体に触れたことを検知するのです。
check to make sure it's a player or NPC,
は、それがプレイヤーかNPCかを確認するためにチェックします。
and if so, we deduct health from their humanoid,
で、その場合、その人型から体力を差し引きます。
which will kill them.
を殺すことになる。
We also add their character
また、彼らのキャラクターを追加します。
to a debounce table for two seconds
を2秒間のデバウンステーブルに
to ensure that there's a cooldown for the script.
で、スクリプトのクールダウンがあることを確認します。
You can find this code
このコードは
by going to the link in the description.
にアクセスしてください。
Select a part and duplicate it.
部品を選択し、複製を作成する。
Then use the scale tool
次に、スケールツールを使用します
to make it cover the area of the sword which we don't hold.
を、持っていない剣の部分をカバーするようにする。
This will be the part which detects touches
タッチを検出する部分となる
from players that the sword hits.
剣が当たったプレイヤーから
Set the transparency of the hitbox to 1,
ヒットボックスの透明度を1に設定します。
and then duplicate a WeldConstraint in the handle
というハンドルで、WeldConstraintを複製します。
and set the Part1 to the hitbox.
を作成し、ヒットボックスにPart1を設定します。
You can test your sword by inserting an NPC into the game
NPCを挿入して剣を試すことができる
via the toolbox or rig builder.
ツールボックスやリグビルダーを経由して
Then walk up to the NPC and touch the sword against it.
そして、NPCに近づき、剣を当てる。
The NPC should be killed.
NPCを殺害する必要があります。
Now you can go back to select your handle
これで、ハンドルネームを選択するために戻ることができます
and set its transparency to 1.
で、その透明度を1に設定します。