構文
firetouchinterest(partA: Instance, partB: Instance, state: 0 | 1 | boolean)エイリアス
firetouchtransmitter引数
| 名前 | 型 | 説明 |
|---|---|---|
partA | Instance | タッチ シミュレーションで使用される最初の BasePart。 |
partB | Instance | タッチ シミュレーションで使用される 2 番目の BasePart。 |
state | 0 | 1 | boolean | タッチを開始するには 0 または false を使用します。タッチを終了するには 1 または true を使用します。 |
説明
2 つの BasePart インスタンス間のタッチ開始またはタッチ終了をシミュレートします。
3 個のパラメータで呼び出します: partA, partB, state。引数表では必須値と動作を調整する値を確認できます。
データは返しません。呼び出しをアクションとして扱い、必要なら呼び出し元でエラーを処理してください。
例
2 つの BasePart 間のタッチ操作を開始して終了します。
local players = game:GetService("Players")
local character = players.LocalPlayer.Character or players.LocalPlayer.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
local targetPart = workspace.TouchTarget
firetouchinterest(rootPart, targetPart, 0)
task.wait()
firetouchinterest(rootPart, targetPart, 1)