Fandom

ROBLOX Wikia

Local part

12,580pages on
this wiki
Add New Page
Comments0 Share
Local parts should be avoided because they are not supported and may behave in unexpected ways.

On ROBLOX, the term "local part" designates a part that is local to one player, that is, that can only be seen and touched by that player. A part, or any object, actually, can be made local to a player by being put as a child of an object that is not replicated to other clients and the server, such as that player's camera. Local parts are not directly a feature of ROBLOX; they only exist because of the way replication works on ROBLOX.

Local parts can be used to do things such as preventing a particular player from going into a specific area by putting a door that is local to him, or making a platform that will only appear for a particular player. They can also be used in building games to allow all the players to work in the same area, but without seeing other players' parts.

For example, the following code, put in a local script that is running on a player's client, would create a part of a random color at position
0
0
0
when ran:
-- This code creates a part of a random color and puts it in the local camera, which makes it not replicate to other instances of ROBLOX.
Instance.new('Part', Workspace.CurrentCamera).BrickColor = BrickColor.Random()

Local parts, while they can be very tempting to use in certain cases, should be avoided, because they are in no way supported by ROBLOX. The ROBLOX team has expressed clearly that they discourage the use of them and that it is likely that they will become unsupported in the future.[1]

The physics for local parts are not handled in the same way as the physics for normal parts because they cannot replicate to the server. For this reason, they will often behave in unexpected ways. Using too many of them may cause lag because the physics for them cannot then be distributed.

References

  1. John Shedletsky, User Feedback v2, ROBLOX Blog, http://blog.roblox.com/2012/05/user-feedback-v2

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.