【Roblox】RobloxStudio アシスタントでできること
はじめに
今回はRoblox Studioで使用できるアシスタント機能について、どのようなリクエストができるか、それと返ってきた回答をセットで紹介します。
Robloxバージョン: 0.664.0.6640713
アシスタントとは
アシスタントとは、Robloxで用意されているAIによるサポートツールです。
質問や命令を入力することでAIが結果を返してくれ、コンテンツ作成を手助けしてくれます。
Creator HubとRoblox Studioからアクセスすることができます。
Creator Hubではドキュメントを表示している際に、上部のナビゲーションから開くことができます。


実際の画面
Roblox Studioではメニューバーの上部にあるアシスタントボタンを押すことで、アシスタントのウィンドウを開くことができます。


Roblox Studioのアシスタントウィンドウは、Roblox Studioに対して直接命令を実行できるコマンドバーのような機能が追加されています。回答を得るだけでなく、スクリプトの作成や実行など開発を手助けしてくれます。
アシスタントウィンドウの機能
アシスタントウィンドウの機能について紹介します。
アシスタントウィンドウの下部にある「・・・」から各種設定を変更することができます。

Auto-run code : 出力されたコードを自動で実行する。
Auto-expand dropdowns : プルダウンを自動で展開する。
Expand all dropdowns : プルダウンをすべて展開する。
Collapse all dropdowns : プルダウンをすべて折りたたむ。
Clear chat : チャットを消す。
アシスタントに質問や要求を行った場合、自身の思っている機能でなくても実行される場合があります。
Ctrl + Z で戻すこともできますが、煩わしい場合は Auto-run code をオフにしましょう。
処理中に Stop generation というチェックボックスが表示されます。
これにチェックを入れることで、投げかけた処理を停止させることができます。

また何かしらの回答が完了した際は、グッドボタン、バッドボタン、やり直しボタンが表示されます。
リクエストごとにグッドボタン・バッドボタンで評価することで、将来の結果の改善に繋がります。
回答が質問にそぐわない場合でもやり直しボタンで回答を再生成することができます。
意外と別の答えを出すので使用するのも手だと思います。

すでに回答を終えたリクエストを編集することもできます。

リクエストの文章の右端にカーソルを合わせると、編集ボタンが表示されます。
これを押下することで、リクエストの編集を行うことができます。

編集後は「Submit」を押下することで、変更されたリクエストへの回答が再度生成されます。
編集をしない場合は「Cancel」を押しましょう。
質問への回答
オーソドックスな使用方法として、Robloxに関することについてアシスタントに質問するという使い方があると思います。
これに関してはCreator HubとRoblox Studioどちらでも使用できます。
Q. ReplicatedStorageとは何ですか。
A. ReplicatedStorageは、Robloxのインスタンスのメモリ内存に在するサービスです。...
ReplicatedStorageは、Robloxのインスタンスのメモリ内存に在するサービスです。ReplicatedStorageは、両方のサーバーサイドとクライアントサイドで利用できるように設計されており、ModuleScript、RemoteFunction、RemoteEventなどのオブジェクトを格納するために使用されます。
ReplicatedStorageは、同じ名前のパッケージをサーバーサイドとクライアントサイドで共有するために使用されることがあります。ReplicatedStorage内のオブジェクトは、サーバーサイドで変更された場合でも、クライアントサイドに自動的に同期されます。
ReplicatedStorageは、以下の特徴を持つとされています。
- サーバーサイドとクライアントサイドで利用できる
- ModuleScript、RemoteFunction、RemoteEventなどのオブジェクトを格納できる
- 同期されたデータストアとして機能する
- 連携するオブジェクトをサーバーサイドとクライアントサイドで共有する
ReplicatedStorageは、多くの用途で使用できます。例えば、ゲーム内で共有されるデータを格納するために使用することができます。また、サーバーサイドとクライアントサイドで共有するために使用することもできます。
ReplicatedStorageを使用することで、ゲーム内のデータをサーバーサイドとクライアントサイドで共有し、データの同期を実現できます。
Sources:
ReplicatedStorage
DataStoreInfo
ReplicatedFirst

回答には情報が記載されているドキュメントのリンクがSources以下に用意されています。
(リクエストに対して関係のないリンクが用意される場合もあります。)
今回は用意されたリンクが一部関係のないものもありますが、内容はおおむね正しい情報が返ってきました。
ただ、他のAIツールでもいえることですが内容は全て正しいとは言えません。
アシスタントを用いて何かしらの回答や提案を知りたい場合は、基本的にはヒントやソースを知る手段として使用することをおすすめします。
スクリプトに対するリクエスト
Roblox Studioで使用できるアシスタントの大きな強みとしては、オブジェクトやスクリプトの挿入をリクエストできる点だと思います。
スクリプトの作成・挿入
Q. Shiftキーを押下している間、移動速度が倍になるスクリプトを作成してほしい。
A. Create a new LocalScript to handle the player's input for...
- Create a new LocalScript to handle the player's input for detecting when the Shift key is pressed and released.
- Use the UserInputService to detect key press events.
- When the Shift key is pressed, double the player's walk speed.
- When the Shift key is released, reset the player's walk speed to its original value.
- Attach the script to StarterPlayerScripts to ensure it runs for each player.
Creating Lua script with name: DoubleWalkSpeedOnShift
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local normalSpeed = humanoid.WalkSpeed
local boostedSpeed = normalSpeed * 2
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = boostedSpeed
end
end)
UserInputService.InputEnded:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = normalSpeed
end
end)
Attaching LocalScript to Instance StarterPlayerScripts
- created  DoubleWalkSpeedOnShift
回答は英語でかえってきましたが、しっかりとリクエスト通り動作するスクリプトが作成されました。

新規でスクリプトを追加した時やスクリプトに差分がある場合は、上記のようにスクリプトのプレビューが表示されます。
エクスプローラーに追加したい場合はプレビュー上部の「Accept」を、追加しない場合は「Cancel」を押しましょう。
スクリプトの編集
アシスタントに作成してもらったスクリプトを編集します。
すでに存在するスクリプトが対象のため、「選択しているスクリプト」に対してリクエストします。
Roblox Studioのアシスタントは選択中のオブジェクトに対して操作を行うこともできます。
これは複数選択している場合でも有効です。
Q. スペースを2回押すことで2段ジャンプする機能を、選択しているスクリプトに追加してほしい。
A. Modify the existing DoubleWalkSpeedOnShift script...
- Modify the existing DoubleWalkSpeedOnShift script to add double jump functionality.
- Use UserInputService to detect double space key presses.
- Implement logic to allow a second jump if the player is in the air and has not yet performed a double jump.
- Ensure the script maintains its current functionality of doubling walk speed when the Shift key is pressed.
Editing Lua script DoubleWalkSpeedOnShift
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local normalSpeed = humanoid.WalkSpeed
local boostedSpeed = normalSpeed * 2
local canDoubleJump = false
local hasDoubleJumped = false
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed then
if input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = boostedSpeed
elseif input.KeyCode == Enum.KeyCode.Space then
if humanoid:GetState() == Enum.HumanoidStateType.Freefall and not hasDoubleJumped then
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
hasDoubleJumped = true
end
end
end
end)
UserInputService.InputEnded:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then
humanoid.WalkSpeed = normalSpeed
end
end)
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Landed then
hasDoubleJumped = false
end
end)

スクリプトの差分があるので、追加時と同様にプレビューが表示されます。
これでShiftダッシュとスペースで2段ジャンプが実装できました。
スクリプトの解説
スクリプトの解説を求めることもできます。
Q.
###
local Lighting = game:GetService("Lighting")
Lighting.ClockTime = 20
###
このスクリプトが何をしているか教えてください。
A.The provided Lua code snippet is designed to be used within Roblox Studio...
The provided Lua code snippet is designed to be used within Roblox Studio, a platform for creating and playing games. This script specifically interacts with the game's lighting settings. Let's break down the code step by step:
local Lighting = game:GetService("Lighting")
1.Service Retrieval: The first line of the code uses the GetService method to access the Lighting service from the game object. In Roblox, services are core components that provide various functionalities, and the Lighting service is responsible for controlling the game's lighting environment, including aspects like time of day, brightness, and ambient colors.
Lighting.ClockTime = 20
2.The provided Lua code snippet is designed to be used within Roblox Studio, a platform for creating and playing games. This script specifically interacts with the game's lighting settings. Let's break down the code step by step:
Service Retrieval: The first line of the code uses the GetService method to access the Lighting service from the game object. In Roblox, services are core components that provide various functionalities, and the Lighting service is responsible for controlling the game's lighting environment, including aspects like time of day, brightness, and ambient colors.
Setting ClockTime: The second line sets the ClockTime property of the Lighting service to 20. The ClockTime property represents the time of day in the game world, expressed in hours on a 24-hour clock. By setting ClockTime to 20, the script changes the in-game time to 8:00 PM. This affects the lighting conditions in the game, typically making it appear as nighttime.
Summary
In summary, this script modifies the lighting environment of a Roblox game by setting the in-game time to 8:00 PM. This is achieved by accessing the Lighting service and adjusting its ClockTime property. As a result, the visual appearance of the game will change to reflect nighttime conditions.

リクエストする際にコード部分を###で囲むことで、コードとリクエストを分離することができます。
これにより、アシスタントは情報を分離できより正確に回答してくれます。
リクエストにコードを貼り付ける場合は、必ず使用しましょう。
Creator Storeからモデルの挿入
Creator Hubからモデルを挿入させることもできます。
Q.500×500の範囲に木をランダムに配置してください。 個数は30個ほしい。
A. ランダムに30本の木を500×500の範囲に配置します。...
ランダムに30本の木を500×500の範囲に配置します。コンソールで出力を確認してください。
local function insertAsset(query: string, relativePosition: Vector3?): Instance?
relativePosition = relativePosition or Vector3.new(0, 0, 0)
local insertService = game:GetService("InsertService")
local streamingService = game:GetService("StreamingService")
local requestId = "441EC4FA-BFBD-4E4A-B3DD-C19CF0A73EFF"
local results = insertService:GetFreeModels(query, 0)
local assets = {}
for i, result in results[1].Results do
if i > 6 then
break
end
table.insert(assets, result.AssetId)
end
assert(#assets > 0, `Failed to find "{query}" in the marketplace!`)
return streamingService:ExecuteCommandAsync(requestId, "InsertAsset", {
assetId = assets[1],
altAssets = assets,
chatGroup = query,
properties = {
instanceName = query,
parentInstanceId = "workspace",
positionOrigin = "currentCamera",
position = {
x = relativePosition.X,
z = relativePosition.Z,
},
},
})
end
local areaSize = 500
local numberOfTrees = 30
for i = 1, numberOfTrees do
local tree = insertAsset("Tree")
assert(tree, "Tree asset not found")
local randomX = math.random(-areaSize / 2, areaSize / 2)
local randomZ = math.random(-areaSize / 2, areaSize / 2)
local randomPosition = Vector3.new(randomX, 0, randomZ)
tree:PivotTo(CFrame.new(randomPosition))
end

大きすぎる...
Creator Storeからモデルをインポートすることに成功しました。
インポートするModelの指定がない場合は、アシスタントウィンドウにて最大6つの候補が表示されます。
エクスペリエンスに取り入れたいモデルを切り替えながら選びましょう。

モデルの候補を切り替えられる!
選択したインスタンスの編集
「スクリプトの編集」でも触りましたが、選択しているインスタンスに対してリクエストすることもできます。
プロパティや親子関係、名称変更など様々な操作ができます。
今回は先ほどランダムに作成された木のモデルに対してリクエストを出します。
Q.「Trees」という名称のModelを1つ追加して、選択しているModelの親にしてほしい。 「Trees」Modelの子のModelの名称を、"Tree_001"のような連番に変更してほしい。 「Trees」Modelの子のModelのLevelOfDetailをStreamingMeshに変更してほしい。
A.I'll add a "Trees" model, parent the selected models to it, rename them with sequential numbers, ...
I'll add a "Trees" model, parent the selected models to it, rename them with sequential numbers, and set their LevelOfDetail to StreamingMesh. Check the console for any messages.
local Selection = game:GetService("Selection")
local selectedModels = Selection:Get()
-- Create a new "Trees" model
local treesModel = Instance.new("Model")
treesModel.Name = "Trees"
treesModel.Parent = workspace
-- Parent selected models to "Trees" and rename them
for index, model in ipairs(selectedModels) do
if model:IsA("Model") then
model.Parent = treesModel
model.Name = string.format("Tree_%03d", index)
model.LevelOfDetail = Enum.ModelLevelOfDetail.StreamingMesh
end
end
-- Set the "Trees" model as the parent of the selected models
Selection:Set({treesModel})

【リクエスト前】Workspaceに生成された木のモデル

【リクエスト後】リクエスト通り親が追加され名称が連番になり、プロパティのLevelOfDetailも変更された
このようにインスタンスに対するリクエストは細かい部分まで通ります。
特定の規則で名称を変更させるのは、エクスプローラーのフィルタリングを使用しても面倒だと思うので、非常に有用だと思います。
UIの配置
インスタンスを挿入できると前述しました。
つまり、UIオブジェクトの挿入もできます。
Q.HPを表示するヘルスバーを作成してほしい。
A.Here's a simple health bar that displays your HP.Please check...
Here's a simple health bar that displays your HP. Please check the console for any output.
-- Create a ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "HealthBarGui"
screenGui.Parent = game.StarterGui
-- Create a Frame to represent the health bar background
local backgroundFrame = Instance.new("Frame")
backgroundFrame.Name = "BackgroundFrame"
backgroundFrame.Size = UDim2.new(0.3, 0, 0.05, 0)
backgroundFrame.Position = UDim2.new(0.35, 0, 0.9, 0)
backgroundFrame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
backgroundFrame.Parent = screenGui
-- Create a Frame to represent the health bar fill
local healthBar = Instance.new("Frame")
healthBar.Name = "HealthBar"
healthBar.Size = UDim2.new(1, 0, 1, 0)
healthBar.BackgroundColor3 = Color3.new(0, 1, 0)
healthBar.Parent = backgroundFrame
local newScript = Instance.new("LocalScript")
newScript.Parent = healthBar
newScript.Source = [[
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local healthBar = script.Parent
-- Update the health bar
local humanoid = character:WaitForChild("Humanoid")
local function updateHealthBar()
local healthPercent = humanoid.Health / humanoid.MaxHealth
healthBar.Size = UDim2.new(healthPercent, 0, 1, 0)
end
-- Call the function initially
updateHealthBar()
-- Call the function whenever the player takes damage
humanoid.HealthChanged:Connect(updateHealthBar)
]]
-- Make sure to run this script from a LocalScript in StarterScripts or StarterPlayerScripts to avoid a warning. The health bar's location can be adjusted.

生成されたUIオブジェクト

生成されたLocalScript

生成されたUIの見た目
このようにUIオブジェクトを作成できます。
正直、UIに関しては細かい位置や色、UIListLayoutなどのレイアウト構造の指示など、指定すべき項目が多いため、アシスタントを使用するよりは自分で配置したほうが早い気がします。
ただ、簡単なUIやモック段階でのUIを表現する際には使用できると思います
グレーボックスをアセットに置き換える
グレーボックスとは、シンプルな形状・色のオブジェクトを本番環境と同じように配置しレベルデザインなどを確認する手法です。
アシスタントでは、配置済みのPartインスタンスをCreator Storeから取得したアセットに置き換えるということもできます。
Q.選択しているPartの名称に応じてCreator StoreからModelを取得し、置き換えてほしい。
A.選択したPartの名称に基づいて、Creator Storeからモデルを取得し、置き換えます。...
選択したPartの名称に基づいて、Creator Storeからモデルを取得し、置き換えます。コンソールで結果を確認してください。
local function insertAsset(query: string, relativePosition: Vector3?): Instance?
relativePosition = relativePosition or Vector3.new(0, 0, 0)
local insertService = game:GetService("InsertService")
local streamingService = game:GetService("StreamingService")
local requestId = "01705C75-CA6F-4AE2-8B4F-73106E4EF2A1"
local results = insertService:GetFreeModels(query, 0)
local assets = {}
for i, result in results[1].Results do
if i > 6 then
break
end
table.insert(assets, result.AssetId)
end
assert(#assets > 0, `Failed to find "{query}" in the marketplace!`)
return streamingService:ExecuteCommandAsync(requestId, "InsertAsset", {
assetId = assets[1],
altAssets = assets,
chatGroup = query,
properties = {
instanceName = query,
parentInstanceId = "workspace",
positionOrigin = "currentCamera",
position = {
x = relativePosition.X,
z = relativePosition.Z,
},
},
})
end
local Selection = game:GetService("Selection")
local selectedParts = Selection:Get()
for _, part in pairs(selectedParts) do
if part:IsA("BasePart") then
local modelName = part.Name
local newModel = insertAsset(modelName)
if newModel then
newModel:PivotTo(part:GetPivot())
part:Destroy()
else
warn("Model for '" .. modelName .. "' not found in Creator Store.")
end
end
end

【リクエスト前】Partで表現されたグレーボックス

【リクエスト後】Partが置き換わった!
Material
アシスタントは、Material Generatorの軽量実装を通じてマテリアルの作成もできます。
Material Generatorについては下記をご覧ください。
Q.葉っぱが紅葉したマテリアルを作成してください。
A.Creating variants of LeafyGrass described as 'autumn leaves with vibrant orange, ...
Creating variants of LeafyGrass described as 'autumn leaves with vibrant orange, red, and yellow hues' and has a Organic pattern.


マテリアルが変更できた
このようにリクエストに応じてマテリアルを作成してくれます。
候補を4種類用意してくれるので、好みにあったマテリアルを選びましょう。
個人的には生成に関してはMaterial Generatorでも簡単に行うことができるのでアシスタントとの差はそれほどないように思えます。
Terrain
アシスタントを利用することで、Terrainを使用した地形の変更を行うこともできます。
Q.500×500のサイズの起伏のある地形を生成してほしい。
A.Here is the code to generate a 500x500 undulating terrain in your workspace:...
Here is the code to generate a 500x500 undulating terrain in your workspace:
--[[Generating a 500x500 undulating terrain. Check the workspace for the result.]]
local terrain = workspace:FindFirstChildOfClass("Terrain")
terrain:Clear()
local size = 500
local height = 50
for x = 0, size, 10 do
for z = 0, size, 10 do
local y = math.sin(x / 50) * math.cos(z / 50) * height
terrain:FillBlock(CFrame.new(x - size / 2, y, z - size / 2), Vector3.new(10, 10, 10), Enum.Material.Grass)
end
end
This script creates a terrain with undulating hills by using sine and cosine functions to vary the height.

起伏のある地形が生成された
このようにアシスタントはTerrainに対してもリクエストすることができます。
注意点
Robloxやアシスタントのバージョンによっては1日のアシスタントへのリクエスト数に制限があります。
(ベータ機能ではと記載があるので、いずれは無くなる?)
制限に達した場合は翌日までアシスタントは使用できないので注意しましょう。

リクエストができない...
所感
しばらくアシスタントを触ってみて、個人的に感じたことをまとめました。
- Robloxに特化しているので想像以上にちゃんとした回答が得られる一方、リクエストの仕方によっては全く関係のない回答になる場合がある。
- → より詳しい情報をリクエストに入れる必要がある。
- 日本語でリクエストをすると、英語と日本語どちらかで回答がくる。
- → 日本語で回答が来た場合にAI特有の誤字や文字化けした回答が多いので、「日本語で回答して」などのワードは入れず自分で翻訳するなどした方がよい。
- 名前を連番にするなどの面倒な作業をリクエストする場合にすごく役立つ。
- リクエスト数の上限があるため、まとめられるリクエストはまとめてもよいかも。
- 本格的なコンテンツ制作でも活躍するが、モック段階やフレームワーク制作での活躍が見られそう。
- Creator Storeから取得した他人が書いたスクリプトの解説などで使用できる。
まとめ
- アシスタントとはRobloxで用意されているAIによるサポートツールで、Creator HubとRoblox Studioからアクセスすることができる。
- Roblox Studioからアクセスできるアシスタントは、Roblox Studioに対して直接命令を実行できるコマンドバーのような機能が追加されている。
- アシスタントウィンドウは、右下の「・・・」からプルダウンを閉じたりチャットを消したりなどができる。
- リクエストした文章の右にカーソルを合わせることで編集ボタンが表示され文章を編集でき、再度リクエストすることができる。
- アシスタントでできること
- 質問への回答
- インスタンス(スクリプトやUIも含む)の作成・挿入
- スクリプトの作成・編集・解説
- Creator Storeからモデルを挿入
- オブジェクトをアセットに置き換える
- インスタンスの名称やプロパティの変更
- Materialの生成(Material Generatorの軽量実装を使用)
- Terrainの作成編集
など...
- 選択しているインスタンスへのリクエストも可能。
- スクリプトを追加・差分がある場合はプレビューが表示され、ユーザーが自身でスクリプトの変更・反映を決定できる。
- バージョンによるが、アシスタントには1日にリクエストできる数に制限がある。
以上がアシスタントの紹介になります。
日本語での回答が一癖あったり、自分の思うような回答が得られない場合もあるかもしれませんが、アシスタントをうまく利用することで開発効率が上がることは間違いないと思います。
今回紹介したこと以外にもできることはたくさんあると思います。
2025年中にアシスタントについて、さらなるアップデートが行われるという情報も目にしました。
さらに利便性の高い機能になるでしょう。
ぜひアシスタントを使ってコンテンツ制作の効率をあげましょう!!
参考
当社ではRobloxを活用したゲームの開発、 また企業の商品やサービスの認知度拡大に寄与する3Dワールドの制作など、 Robloxにおける様々な活用支援を行っております。 Robloxのコンテンツ開発をご検討されている企業様は、お気軽にご相談ください。 landho.co.jp/
Discussion