What are they? What do they do? I've heard of them before, but never thought to get into them. How do I create a localpart?
Local parts are parts that are created on your client and aren't propagated back to the server . Only you can interact with those parts and access their properties, they are hidden from the server and another player's client.
local parts can be created by Instancing a new part and parenting them into the Camera, (or Workspace with filtering enabled set to true) or creating a message instance into the character and parenting the part to the message, all via the client (localscript).
-- With Filtering Enabled set to true repeat wait() until game.Players.LocalPlayer local part = Instance.new("Part",game.Workspace) -- Via Camera repeat wait() until game.Players.LocalPlayer local container = Instance.new("Camera") container.Name = "LocalBin" container.Parent = Workspace local platform = Instance.new("Part") platform.CFrame = character.Torso.CFrame * CFrame.new(0, -3, 0) platform.Anchored = true platform.Size = Vector3.new(10, 1.2, 10) platform.Parent = container -- Via Message instance in Character repeat wait() until game.Players.LocalPlayer local character = player.Character local bin = Instance.new("Message") bin.Name = 'LocalBin' bin.Parent = character local part = Instance.new("Part",bin)
Local Parts are parts that are rendered locally via the persons computer, if a part is not local its rendered by the server but if its local its rendered by your computer which makes it significantly faster. Now local parts are parts rendered by your computer only and they interact only with you. There are currently 2 ways of creating a local part which is putting the local part in a message thats childed to a persons humanoid model. This message must be local aswell and created by a local script. The second way is putting the part in CurrentCamera which is a preset local part.