TweenService:Create no property named 'CFrame' for object 'ofdoor'

So here’s the script:
game:GetService("TweenService"):Create(workspace.ofdoor, TweenInfo.new(1, Enum.EasingStyle.Quad), {CFrame = workspace.ofdoor.Hinge.CFrame * CFrame.Angles(0,math.rad(97.89),0)}):Play()

I want to make door animation. The script is server side. So are the script wrong or something else?

1 Like

Hello there. Are you attempting to tween a model or a part?

1 Like

If this is a model, make sure you use PrimaryPart instead of treating the model as a BasePart.

This does mean you have to weld every part of the door to the primary part in order to achieve the desired effect.

Thank you!

1 Like

I want to animate a part not a model.

1 Like

The Hinge already I set to a PrimaryPart.

1 Like

What is the class for workspace.ofdoor?

1 Like

The class of that model is a Group

What? There is no class named Group.

Click on workspace.ofdoor in Explorer and look inside the Properties pane and tell me what ClassName reads.

2 Likes

The class of that thing is a Model

Then tween the PrimaryPart instead of the model itself, or the hinge as you said.

game:GetService("TweenService"):Create(workspace.ofdoor.Hinge, TweenInfo.new(1, Enum.EasingStyle.Quad), {CFrame = workspace.ofdoor.Hinge.CFrame * CFrame.Angles(0,math.rad(97.89),0)}):Play()
1 Like

Nah it just rotate the Hinge.

1 Like

Hello? Are you still there ???

Weld all of the parts in the Model to the hinge using WeldConstraints.

Just insert a WeldConstraint for every part that isnt the hinge, set Part0 to that target part, then Part1 to the hinge.

image
Like this? Unfortaneatly it not work. It’s still only rotate the Hinge

You need to unanchor all the parts except the hinge for them to rotate with it

Ok I will try that later. See you in some hours!

Thank you for your help! It worked!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.