How can I twT^een like this

ik how to tween cframes and rotations and positions but

how can I tween position seperatly from rotation
for exmaple

local Tween = game.TweenService:Create(Part, TweenInfo.new(0.5, EasingStyle), {CFrame = CFrame.new(NextWaypoint.Position)})
local Tween = game.TweenService:Create(Part, TweenInfo.new(0.5, EasingStyle), {CFrame = CFrame.fromeaulieranglesxyz(Part.Rotation)})

(both are played after being defined)

the last tween would cancel out the first one.
I don’t want that.

4 Likes

You just need to not use CFrame.

CFrame has both Positional and Rotational information. If you instead tween the Position property, then the Rotation property, then you shouldn’t have any issues.

I am tweening a human and if I don’t use cframe it doesn’t move the other parts

Are you intending to have both tweens happen at the same time, for the same duration, and with the same easing style?

they happen at the same time for different durations and yeah same styyle

I’ve came up with maybe a bit inefficient method but it works for now!!

image

Inside WaypointTo script:

while true do
	script.Parent:PivotTo( CFrame.new( script.Parent.GoalPosition.Value.Position) * script.Parent.GoalRotation.Value.Rotation )
	task.wait(.01)
end

The goalposition is a CFrameValue and same with goalrotation. You have to tween the goalposition/rotation values.

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