It can be challenging to locate friends in-experience. The FriendsLocator developer module lets players easily find and teleport to their friends inside a place. Uh oh! Your browser doesn't appear to support embedded videos! Here is a direct link to the video instead.
If you're using developer modules in your experiences and would like to help build the future of co-experience on Roblox, fill out this form to request access to a private DevForum category. You can also submit feedback here. To use the FriendsLocator module in an experience:
This and other developer modules come with an Install script that runs the installer and distributes the contents of the module to the same services that the folders are named after. The Install script can be utilized as follows: EnableLogging — Set to true to enable debug logging for the current developer module. This lets you see how the module gets distributed, along with how each package is linked.
InstallStarted — Fires when the installer first starts up. You can hook into this event to run any pre-install steps.
InstallFinished — Fires when the installer has finished installing the module. By this point, the contents of each service folder has been distributed. You can also hook into this event to run any post-install steps. The source developer module (parent of the Install script) has Instance/Destroy|Destroy() run on it immediately after this event is fired.
Install() — Installs the given developer module by overlaying each of the service folders over existing services. For example, a folder named ReplicatedStorage containing a FriendsLocator script will be distributed to game.ReplicatedStorage.FriendsLocator when installing.
To test the module in Studio, the FriendsLocator module must be run in a multi-client simulation, since no friends will be present in a solo playtest.
Due to the way user IDs are handled in Studio, avatar images will not appear on the locator icons during testing. By default, interacting with an icon will teleport your character to that friend's location. Currently, experiences using Workspace/StreamingEnabled|StreamingEnabled should implement custom content pre-streaming around the teleport location, although this behavior will be built into future versions of the module. The FriendsLocator module exposes events so that you can introduce custom behaviors when users interact with a locator icon.
If the default style does not fit your experience, you can replace the default avatar portrait UI with your own UI. To replace the default UI:
If you want the friend’s avatar portrait and Player/DisplayName|DisplayName to show up somewhere in the custom UI, you can place the following instances inside the FriendLocator frame:
The module will look for these items and display the friend’s avatar portrait and/or display name respectively.
Overrides the default configurations with the given values.
Fires when a locator icon is clicked/activated by the local player.
Fires when a locator icon is shown/hidden on the local player’s screen.
|