Dialogs are objects that allow you to create NPC characters that you can talk with, using a built-in interface. It’s very easy to use, and doesn’t even require scripting. However, you can add extra functionality with the event Dialog/DialogChoiceSelected. Show You can use them to: *Create NPC characters that reward you, or give you quests. *Create help bots. *Make talking enemies. *Anything really, just use your imagination! Basic OverviewDialogs are actually very easy to use, with no scripting necessary for those of you who aren’t accomplished in Lua. They form like the image below: The Dialog object displays the initial prompt, which then gives the user the choice of replies from the DialogChoice objects. The DialogChoice then gives the user the choice of replies from the DialogChoice objects inside itself. Creating a basic DialogMaking the speech bubbleFirst, open Roblox Studio and create a new place. In explorer (View -> Explorer), select the part you want the speech bubble to appear above. Click Insert, select Basic Objects, and in the window that appears select Dialog. There’s your initial dialog object created! You won’t be able to see a speech bubble appear until you run the game with a character in (online or test solo). Hooray! You’ve got your first part to speak when you click on its icon! Adding choicesSo, you’ve got your speech bubble. That’s great and all, but you can’t talk to it, can you? Adding more choicesOur Dialog now has several choices from the user to choose from, which result in the part giving a response. Additionally, we can add choices to those choices, creating a larger conversation with the part. More properties and customisationYou can customise your Dialog further with additional properties. Change these with the properties window. Dialog/ConversationDistance: Set this to the maximum distance from which you can talk to the part. If you start within the distance and then walk out of it, the conversation will end. Dialog/Purpose: These are the different icons that appear above the part for you to click on. Quest is a !, Help is a ? and Shop is a $. Dialog/Tone: This is the color of the conversation - the speech bubble, and the choice GUI. Friendly is green, Neutral is blue and Enemy is red. ExampleHere’s an example of a Dialog being used. ScriptingIf you’re accomplished with Roblox Lua, you can add even more functionality to your NPC part. The scripting event DialogChoiceSelected holds two arguments - the player object and the object of the choice the player selects. It does not return the name of the choice. It fires whenever the player selects a choice. workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) print(player.Name,choice.Name) end)That would print the name of the player and the name of the choice selected whenever the player selects a choice. You can’t localise it to a specific choice with the Dialog methods. If you want to make something happen whenever a player selects a specific choice, you need to give it a unique Name property and compare it with an if statement. workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "No" then player.Character.Humanoid.Health = 0 elseif choice.Name == "Yes" then player.Character.Humanoid.Health = 1000 end end)You can make something happen whenever a certain player selects a certain choice as well. Example: workspace.Dialog.DialogChoiceSelected:connect(function(player,choice) if choice.Name == "isplayer" and player.Name == "pighead10" then player.Character.Humanoid.Health = 10000 end end)With this event, you can give characters quests, rewards, shop items and more! In Roblox, models from third-party modeling tools are called meshes. A mesh is a collection of vertices, edges, and faces that make up a 3D object such as a prop, building, or character. Meshes can include far more detail than any objects you model using parts in Studio. They can also have internal rigs and textures, allowing you to
create lifelike deformable objects that you can pose and animate. You can import meshes that you create using third-party software, such as Blender or Maya, as a MeshPart into Studio, or you can find thousands of meshes made by Roblox and the Roblox community within the Creator Marketplace to use within your experience. For information on modeling tools available within Studio, see Modeling in Studio. Studio supports several mesh types, such as rigged and skinned meshes that require additional steps to set up before importing into Studio. When creating a generic, rigged, or skinned mesh, see Mesh Requirements for modeling specifications and guidelines for use in Studio. Once you model your mesh, see Export Requirements for instructions on exporting your model from Blender or Maya. A rigid mesh with a rig, or internal skeleton structure, can articulate at specific points of the mesh based on its rig. See Rigging for more details and modeling guides on adding rigs to meshes. A skinned model is a rigged mesh that bends naturally at specific points, creating a more natural pose. See Skinning for more details and modeling guides on skinning a rigged mesh. You can apply advanced textures created in a third-party application to a mesh using SurfaceAppearance. SurfaceAppearance uses up to 4 separate image files to create a realistic surface on the parented mesh in a variety of lighting scenarios. See Surface Appearance for more details and examples of using these specialized textures. Meshes in StudioYou can search through the Creator Marketplace for a large catalog of community-uploaded meshes to use in your experience, or import your own. When adding meshes to your experience, you can configure textures, details, collisions, and more. See Meshes in Studio for more information on discovering, importing, and configuring meshes in Studio. |