Reference API Roblox

Engine API

Website

Related

Reference API Roblox

StarterGear

If the game allows gear, StarterGear is a container automatically inserted into each Player object when the player joins the game. Whenever the player's character spawns, the contents of that player's StarterGear are copied into the player's Backpack.

Member index 0

HistoryMember
No members defined by StarterGear.
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
702PredictionMode: PredictionMode
670Sandboxed: bool
680UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

When a player spawns, the contents of that player's StarterGear is copied into the player's Backpack. Additionally, if the game allows gear, all of the appropriate gear Tools that the player owns are inserted into that player's StarterGear.

Unlike StarterPack, StarterGear isn't a service but rather a child of each Player object, so its contents are player‑specific. Whether or not gear can be permitted is determined in a place's Permissions settings. You can enable gear by its genre or choose specific types to allow. To disable gear, ensure all the gear types are unselected.

Listening to the Players.PlayerAdded event from a server Script is useful for accessing StarterGear:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
local Players = game:GetService("Players")

local toolPrefab = Instance.new("Tool")
toolPrefab.Name = "Example Tool"

local function onPlayerAdded(player)
	-- Wait for StarterGear to be added
	local starterGear = player:WaitForChild("StarterGear")
	-- Clone prefab tool to StarterGear
	local toolClone = toolPrefab:Clone()
	toolClone.Parent = starterGear
end

Players.PlayerAdded:Connect(onPlayerAdded)

Gameplay Considerations

Always test experiences after adding gear to them to check that users can't easily abuse them there. Gear may include Script objects which allow the player to perform actions that you might not consider; for example, navigational gear might allow the player to access a part of the map that you don't want them to, and weapon gear may allow the holder to damage other players, possibly without retribution or retaliation.

History 1

Settings