Lớp công cụ
Shirt
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Tóm Tắt
Thuộc Tính
ShirtTemplate:ContentId |
Mẫu mã
Thay Đổi Áo / Quần
local Players = game:GetService("Players")
local function replaceClothes(player)
local character = player.Character
if character then
-- tìm áo / quần
local shirt = character:FindFirstChildOfClass("Shirt")
local pants = character:FindFirstChildOfClass("Pants")
-- tạo áo / quần nếu chúng không tồn tại
if not shirt then
shirt = Instance.new("Shirt")
shirt.Parent = character
end
if not pants then
pants = Instance.new("Pants")
pants.Parent = character
end
-- đặt lại id nội dung áo / quần
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=83326831"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=10045638"
end
end
for _index, player in ipairs(Players:GetPlayers()) do
replaceClothes(player)
endTài Liệu Tham Khảo API
Thuộc Tính
ShirtTemplate
Shirt.ShirtTemplate:ContentId
Mẫu mã
Thay Đổi Áo / Quần
local Players = game:GetService("Players")
local function replaceClothes(player)
local character = player.Character
if character then
-- tìm áo / quần
local shirt = character:FindFirstChildOfClass("Shirt")
local pants = character:FindFirstChildOfClass("Pants")
-- tạo áo / quần nếu chúng không tồn tại
if not shirt then
shirt = Instance.new("Shirt")
shirt.Parent = character
end
if not pants then
pants = Instance.new("Pants")
pants.Parent = character
end
-- đặt lại id nội dung áo / quần
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=83326831"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=10045638"
end
end
for _index, player in ipairs(Players:GetPlayers()) do
replaceClothes(player)
end