mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 06:34:09 +00:00
rules
This commit is contained in:
parent
a9b4f8e83b
commit
e6efc04756
8494 changed files with 495610 additions and 0 deletions
72
.cursor/rules/roblox/reference/engine/classes/Pants.yaml
Normal file
72
.cursor/rules/roblox/reference/engine/classes/Pants.yaml
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# This file is automatically generated. Please don't edit it manually.
|
||||
# To submit a bug report on the content, see
|
||||
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
|
||||
|
||||
name: Pants
|
||||
type: class
|
||||
memory_category: Instances
|
||||
summary: |
|
||||
Displays a Pants texture from the Roblox website to display on a
|
||||
`Class.Humanoid` rig.
|
||||
description: |
|
||||
The `Pants` object displays a pants texture from Roblox on a `Class.Humanoid`
|
||||
rig. Pants cover the torso and legs, and will be covered by a `Class.Shirt` on
|
||||
the torso. To be visible, a `Pants` must be a sibling of a `Class.Humanoid`
|
||||
and have its `Class.Pants.PantsTemplate|PantsTemplate` property set to an
|
||||
appropriate texture such as `rbxassetid://86896501`. The pants texture may be
|
||||
colorized using the `Class.Clothing.Color3` property.
|
||||
|
||||
Pants are automatically loaded on `Class.Player` characters if their avatar is
|
||||
wearing one.
|
||||
code_samples:
|
||||
- Shirt-Pants
|
||||
inherits:
|
||||
- Clothing
|
||||
descendants: []
|
||||
tags: []
|
||||
deprecation_message: ''
|
||||
properties:
|
||||
- name: Pants.PantsTemplate
|
||||
summary: |
|
||||
Determines the texture of the `Class.Pants`.
|
||||
description: |
|
||||
The content ID link pointing to the pants template hosted on Roblox.
|
||||
|
||||
This content ID is different than the website URL of the pants. It can be
|
||||
found by pasting the website URL of the pants into the **PantsTemplate**
|
||||
property in Studio. Alternatively, `Class.InsertService:LoadAsset()` can
|
||||
be used to insert the pants into the workspace, for example:
|
||||
|
||||
```
|
||||
local InsertService = game:GetService("InsertService")
|
||||
local Workspace = game:GetService("Workspace")
|
||||
|
||||
local webURL = "https://www.roblox.com/catalog/1804739/Jeans"
|
||||
local assetId = tonumber(string.match(webURL, "%d+") or 0) -- Extract the number
|
||||
local success, model = pcall(function()
|
||||
return InsertService:LoadAsset(assetId)
|
||||
end)
|
||||
if success then
|
||||
model.Parent = Workspace
|
||||
end
|
||||
```
|
||||
|
||||
For a `Class.Shirt` object's template, see `Class.Shirt.ShirtTemplate`.
|
||||
code_samples:
|
||||
- Shirt-Pants
|
||||
type: ContentId
|
||||
tags: []
|
||||
deprecation_message: ''
|
||||
security:
|
||||
read: None
|
||||
write: None
|
||||
thread_safety: ReadSafe
|
||||
category: Appearance
|
||||
serialization:
|
||||
can_load: true
|
||||
can_save: true
|
||||
capabilities:
|
||||
- Avatar
|
||||
methods: []
|
||||
events: []
|
||||
callbacks: []
|
||||
Loading…
Add table
Add a link
Reference in a new issue