How do I Rotate and Move the same model separately?

  1. What do you want to achieve?

I’m trying to make my model spin and rotate separately using tweenservice so I can adjust the speeds separately from each other.

  1. What is the issue?

I read on the API that, If two tweens attempt to modify the same property, the initial tween will be canceled and overwritten by the most recent tween.

The bottom format of my code is set this way to show you what I want to happen, so far only partTween2 plays and the rotation never plays, but is there a way around this? How could I make it so that it rotates and spins with different properties (as shown below I have info and info2)

  1. What solutions have you tried so far?

I’ve tried using a while loop separately to spin the model and play the tween, doesn’t work together
I’ve tried looking into using bodyangularvelocity but I’m not sure how it’d work for this and how would I go about it
Changing the rotation and position at the same time works but the rotation would be too slow for my model which is why I want it separate so the rotation fast and the position changing of the model is slow.


local rotation = {
	CFrame = primary.CFrame * CFrame.Angles( 0, math.rad( 90 ), 0 )
}

local info = TweenInfo.new(
	0.2,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	-1
)



local position = {
	CFrame = primary.CFrame + Vector3.new(5,0,0)
}

local info2 = TweenInfo.new(
	2,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	-1,
	true,
	1
)


local partTween = TweenService:Create(primary, info, rotation)
local partTween2 = TweenService:Create(primary, info2, position)

partTween:Play()
partTween2:Play()

This is all editing the CFrame itself: have you tried just changing the position and orientation of the model’s PrimaryPart instead? Afaik editing these two separately is the same as editing the CFrame, only with orentation having a different order of X Y and Z values.

Okay, I think I got the idea of that, I’m using
local rotation = {
Rotation = primary.Rotation + Vector3.new(0,90,0)
}
for the spinning and it seems to play while the position is changing, thank you so much! :smiley:

2 Likes