title | description |
---|---|
Assistant prompt guide and examples |
Get tips and tricks on how best to prompt Roblox's AI Assistant to get the best results. |
This document gives guidance on prompting Assistant and provides examples and inspiration on what Assistant can do.
If Assistant fails, add more details to your prompt and try again. Use instance names exactly as they're spelled, specify which function you want Assistant to use, and tell Assistant which type it's working with, such as a part or a model.
**Not specific** | **More specific** |
---|---|
Place the trees in a circle. | Place 10 copies of the "pine_tree" model in ReplicatedStorage in a 30 stud radius circle around the SpawnLocation. |
Make the part move. | Add a script to make "my_part" move up and down 10 studs repeatedly using TweenService. |
How can I design a core loop? | Help me design a fun core loop for my game. I want to build a game where players can hunt treasure as pirates. They can also buy and upgrade pirate ships and battle each other. |
Selection is a great way of specifying an object or set of objects you want to refer to in your prompt. Select multiple objects and ask Assistant to modify them, make duplicates and place them somewhere, or continue a position pattern like maintaining placement in a line.
Assistant sometimes confuses the difference between edit time and run time. If you ask Assistant to take an action, it will likely bias towards doing it at edit time. If you want the action to happen during run time, ask Assistant to insert a script that takes the action. For example, tell Assistant "add a script to make the time of day 8:00 AM" instead of "make the time of day 8:00 AM."
Don't get discouraged if Assistant doesn't work exactly the way you want the first time. Often, making small tweaks and trying again can lead to better results. Many AI tools are non-deterministic, meaning they don't create the exact same output each time you ask them to do something. There's some variance, which you can tap into and control using tweaks to your prompt.
AI in its current state requires work. It takes time to understand how to best speak to Assistant, what it can do, and how to get what you want out of it.
Consider using multi-step prompts to encourage Assistant to think. Instead of asking "Can you explain this script to me?" and pasting in the script, ask it to explain step-by-step by separating the question from the script with ###
. This separation helps Assistant deconstruct and organize the information to provide better answers.
Can you explain what this script is doing step by step?
###
local part = workspace.Part
local function onTouched(otherPart)
print(part.Name .. " collided with " .. otherPart.Name)
endpart.Touched:Connect(onTouched)
###
Certainly! This script is an example of how to handle collisions between two parts in Roblox. Let's break it down step by step:
local part = workspace.Part
: This line of code creates a local variable namedpart
and assigns it the value of thePart
object located in the workspace. You can replacePart
with the name of the specific part you want to detect collisions with.local function onTouched(otherPart)
: This line of code defines a function namedonTouched
that takes in a parameterotherPart
. This function will be called whenever the part collides with another part.print(part.Name .. " collided with " .. otherPart.Name)
: This line of code prints a message to the output console, indicating that thepart
has collided withotherPart
. Thepart.Name
andotherPart.Name
are concatenated using the..
operator to form the message.part.Touched:Connect(onTouched)
: This line of code connects theonTouched
function to theTouched
event ofpart
. Whenever the part collides with another part, theonTouched
function will be called.
These examples demonstrate the vast variety of tasks that Assistant can help with today. Some of them might take a few tries for you to reproduce, but give them a try and see what you can come up with yourself.
Prompt: Propel a fireball away from the player in the direction the player is facing when the player presses "e". Make the fireball explode when it hits something.