Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Would You Tween the Rotation of a Model?

I've been doing some tweening already with individual parts and stuff, but how would you use tweening to rotate a model (with its primary part I presume)?

Here's the format I've been using for my tweening so far.

local TweenService = game:GetService("TweenService")
local part = script.Parent
 
local openGoal = {}
openGoal.Size = part.Size + Vector3.new(5,5,5)
openGoal.Position = part.Position + Vector3.new(0, 0, 10)
openGoal.Color = Color3.fromRGB(0,0,0)

local tweenInfo = TweenInfo.new(4)
 
local open = TweenService:Create(part, tweenInfo, openGoal)

open:Play()

3 comments

0

openGoal.Rotation = part.Rotation + Vector3.new()...

0

Rotation is not a valid member of model...

0

@greatneil80 it is Orientation not Rotation xd Rotation is for gui

1 answer

✓ Accepted answer

I'm pretty sure you can do this by setting the CFrame of the Model's PrimaryPart and then using CFrame.Angles for the rotation, I went ahead and made an uncopylocked game to show you how: https://www.roblox.com/games/3441522801/Tween-Test

1 comment

0

I don't understand 60% of what you had in that script, but I was able to get it to work fairly well, so thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.