Reference API Roblox

Engine API

Website

Related

Reference API Roblox

StarterGear

If the game allows gear, StarterGear contains all of a player's appropriate gear. Whenever the player's character spawns, all of the contents of that player's StarterGear will get copied into the player's Backpack.

Member index 0

HistoryMember
No members defined by StarterGear.
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: 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
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: 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()
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

StarterGear is a container that is automatically inserted into each Player when the player joins the game. When a player spawns, the contents of that player's StarterGear is copied into the player's Backpack. Additionally, when a player connects to a game that permits gear, all of the appropriate gear Tool objects that the player owns are inserted into that player's StarterGear.

Unlike StarterPack, StarterGear is not a service but rather a child of each Player object -- this means that its contents are player-specific so that each player can have different Tools within their StarterGear. It is not replicated to any client, including the owning player.

Accessing StarterGear

Listening to the Players.PlayerAdded event is useful for

local Players = game:GetService("Players")

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

-- Accessing StarterGear from Server Script
local function onPlayerAdded(player)
	-- Wait for the StarterGear to be added
	local starterGear = player:WaitForChild("StarterGear")
	-- Add a Tool to the StarterGear
	local toolExample = toolExamplePrefab:Clone()
	toolExample.Parent = starterGear
end

Players.PlayerAdded:Connect(onPlayerAdded)

Allowing Gear

Whether or not gear can be permitted is determined in a place's settings page under 'Permissions'. On the permissions page gear can be disabled and enabled by genre and type. To disable gear, ensure all the gear types are not selected.

Individual gear can also be added to a game using the 'Add to game' feature in the Roblox catalog. This option can be found on the page of any gear that is on sale. When gear is added to a game in this manner it will appear under the 'Store' heading on the game's page. The owner of the game (group or user) receives a commission when gear is sold in this manner.

Gameplay Considerations

Before adding any gear to a game, consider the implication of doing so. Gear includes Scripts and allows the player to perform actions that the developer may not have considered. For example, a navigational gear may allow the player to access a part of the map the developer does not want to be accessed. Weapons allow players with gear to damage other players, possibly without the ability to retaliate. Always play-test games after adding gear to them to make sure there are no abuse cases.

History 1

Settings