local player = vci.vc.room.GetAllPlayers()[1] local character = player.Character local previousIsAvailable = character.IsAvailable() -- IsAvailableが変化したタイミングでprintする local function DetectIsAvailableValueChange() if character.IsAvailable() == previousIsAvailable then return end if character.IsAvailable() then print("Character got available.") else print("Character got unavailable.") end previousIsAvailable = character.IsAvailable() end vci.StartCoroutine( coroutine.create( function() while true do DetectIsAvailableValueChange() coroutine.yield() end end )) local bones = { "Hips", "LeftUpperLeg", "RightUpperLeg", "LeftLowerLeg", "RightLowerLeg", "LeftFoot", "RightFoot", "Spine", "Chest", "UpperChest", "Neck", "Head", "LeftShoulder", "RightShoulder", "LeftUpperArm", "RightUpperArm", "LeftLowerArm", "RightLowerArm", "LeftHand", "RightHand", "LeftToes", "RightToes", "LeftEye", "RightEye", "Jaw", "LeftThumbProximal", "LeftThumbIntermediate", "LeftThumbDistal", "LeftIndexProximal", "LeftIndexIntermediate", "LeftIndexDistal", "LeftMiddleProximal", "LeftMiddleIntermediate", "LeftMiddleDistal", "LeftRingProximal", "LeftRingIntermediate", "LeftRingDistal", "LeftLittleProximal", "LeftLittleIntermediate", "LeftLittleDistal", "RightThumbProximal", "RightThumbIntermediate", "RightThumbDistal", "RightIndexProximal", "RightIndexIntermediate", "RightIndexDistal", "RightMiddleProximal", "RightMiddleIntermediate", "RightMiddleDistal", "RightRingProximal", "RightRingIntermediate", "RightRingDistal", "RightLittleProximal", "RightLittleIntermediate", "RightLittleDistal" } for k,v in pairs(bones) do local transform = character.GetBoneTransform(v) -- {"position": Vector3, "rotation": Quaternion} if transform == nil then print("bone is not found: "..v) else print(v.."\nposition:"..tostring(transform["position"]).."\nrotation: "..tostring(transform["rotation"])) end end