wait(5)
for _, child in ipairs(script.Parent:GetChildren()) do
if child:IsA("Keyframe") then
child.HumanoidRootPart.Torso.SheatheModel.CFrame.Position = Vector3.new(0, 0, 0)
print(child.HumanoidRootPart.Torso.SheatheModel.CFrame.Position.X)
print(child.HumanoidRootPart.Torso.SheatheModel.CFrame.Rotation.X)
end
end
If you’re wanting to set the Position, just do SheatheModel.Position
or change the CFrame instead.
You can’t modify the position of a CFrame directly.
One way to work around that is to just not access the CFrame and go directly to the position,
i.e.
child.HumanoidRootPart.Torso.SheatheModel.Position
Position is not a valid member of Pose “Workspace.TemplateR6.AnimSaves.sheath.Keyframe.HumanoidRootPart.Torso.SheatheModel”
child.HumanoidRootPart.Torso.SheatheModel.CFrame = CFrame.new(0,0,0)
Do you need the rotation to be maintained? If so, then lmk
Yes, I do, the reason im doing this is because the blender animation exporter also exported position, which i dont want
So, any way to do this?
charlimit
Objects have a property ‘CFrame’, and a property ‘Position’. CFrame has a property position, but this is read only. So you can get the position of a CFrame, but if you want to set it, you just have to set the CFrame itself (CFrame = CFrame.new(Vector3.new(0,0,0))
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.