概要
範例程式碼
手動定位帽子
-- 設定帽子變數 local hat = script.Parent
-- 獲取角色 local character = hat.Parent
-- 手動設定帽子的位置 hat.Handle.CFrame = character.Head.CFrame * CFrame.new(0, character.Head.Size.Y / 2, 0) * hat.AttachmentPoint:inverse()-- 設定帽子變數 local hat = script.Parent
-- 獲取角色 local character = hat.Parent
-- 手動設定帽子的位置 hat.Handle.CFrame = character.Head.CFrame * CFrame.new(0, character.Head.Size.Y / 2, 0) * hat.AttachmentPoint:inverse()