Profile Card

*Nội dung này sẽ sớm có sẵn bằng ngôn ngữ bạn chọn.

It can be interesting to learn about other players. The ProfileCard developer module is a great way to see more information about others within an experience, from badges achieved to the player's favorite games.

Module Usage

Installation

To use the ProfileCard module in an experience:

  1. From the View tab, open the Toolbox and select the Creator Store tab.

    Toolbox toggle button in Studio
  2. Make sure the Models sorting is selected, then click the See All button for Categories.

  3. Locate and click the Dev Modules tile.

  4. Locate the Profile Card module and click it, or drag-and-drop it into the 3D view.

  5. In the Explorer window, move the entire ProfileCard model into ServerScriptService. Upon running the experience, the module will distribute itself to various services and begin running.

Views

Profile cards have different views depending on whether you're viewing your own card or another player's card.

When you first spawn into the experience, an icon appears over your character. Clicking the icon opens the profile card view. Once the card is closed, the icon disappears, but you can reopen the card at any time by clicking your character.

When viewing your own card, it appears as it would to another player, except placeholder text will appear for any blank inputs. Additionally, the status string is subject to text filtering, as any free text input should be.

Card without custom status
Card with custom status
Entering a custom status
Attempt to enter invalid status

API Reference

Functions

configure

configure(config: table)

Overrides default configuration options through the following keys/values in the config table. This function should be called from a LocalScript within StarterPlayerScripts.

KeyDescriptionDefault
alwaysOnTopIf true, shows locator icons on top of everything, preventing them from being blocked by 3D world objects.true
showPersonalIndicatorIf true, shows the personal indicator when a player first joins the experience.true
showBlurIf true, shows the blurry screen background when a player enters edit mode.true
maxClickDistanceMaximum distance from the camera viewpoint a card will appear when a character is clicked, measured in studs.100
backgroundColorBackground color for the card (Color3).[228, 255, 255]
backgroundTransparencyTransparency of the card's backgroundColor.0.2
isScaledIf true, automatically scales the size of the text to fill the height of the space.false
isTruncatedIf true, automatically hides the ends of strings that would otherwise be too long for proper viewing.true
hasRoundedCornersIf true, the card's corners will be rounded.false
cornerRadiusValueValue of the UICorner corner radius, if hasRoundedCorners is true.20
hasBorderIf true, shows a border for the card.false
borderColorColor of the card's border (Color3). Only applies if hasBorder is true.[228, 255, 255]
borderThicknessThickness of the card's border, if hasBorder is true.3
borderTransparencyTransparency of the card's border, if hasBorder is true.0
borderLineJoinModeCorner style of the card's border (Enum.LineJoinMode). Only applies if hasBorder is true.Round
headerFontSizeFont size for the card's header.18
headerFontTypeFont type for the card's header (Enum.Font).GothamBlack
textFontSizeFont size for the card's body text.15
textFontTypeFont type for the card's body text (Enum.Font).GothamMedium
LocalScript

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProfileCard = require(ReplicatedStorage:WaitForChild("ProfileCard"))
ProfileCard.configure({
alwaysOnTop = true,
maxClickDistance = 50,
backgroundColor = Color3.fromRGB(0, 0, 0),
backgroundTransparency = 0.4
})