Hello!
I have a model that has a few parts and I have the Primary Part set to one of the parts inside the model. How would I move the model while rotating it as well? As a reference, the model is an Iron Man helmet and I want to move the faceplate like in the movies when it opens up. I tried using the TweenService but it tells me "TweenService:Create no property named 'Position' for object 'Mask'"
This is what I have so far:
local helmet = game.Workspace["Iron Man Bleeding Edge"].Helmet local mask = helmet.Mask local tweeningInformation = TweenInfo.new( 5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local partProperties = { Position = mask:GetPrimaryPartCFrame() * CFrame.new(0, 10, 0) } local Tween = tweenService:Create(mask,tweeningInformation,partProperties) wait(10) Tween:Play()
So, heres the fixed script:
local helmet = game.Workspace["Iron Man Bleeding Edge"].Helmet local mask = helmet.Mask local tweeningInformation = TweenInfo.new( 5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local partProperties = { CFrame = mask:GetPrimaryPartCFrame() * CFrame.Angles(0, 10, 0) } local Tween = tweenService:Create(mask.PrimaryPart,tweeningInformation,partProperties) wait(10) Tween:Play()
edit: i hope it works now The problem was: You were tweening the position, but you insert a CFrame value there. I hope it helps! And if it did, accept the anwser :D