Why does my Motor6D tweening function not work?


I’m trying to make a Studio plugin that allows you to take an animation and convert it into something useable on any game through the use of a module.

This was made for use in Script Builders, but could be convenient for anyone trying to create animations for multiple games with multiple ownerships.

For example, let’s say you made a nice sword and want to share it with a few of your friends.
It would be annoying to have your friends re-upload a bunch of animations.

The idea is that the plugin creates a module with a Roblox animation’s KeyframeSequence inserted inside of it.
The module would simply return the KeyframeSequence.
Then, the plugin prompts you to upload this as a MainModule and you can use the MainModule’s ID as the custom animation ID.
From there, you would use another pre-written module that I provide to load the animation using the created custom animation ID.

Making “Roblox animation to anyone-can-use-anywhere animation” converter through the use of Modules.
This function not working is prohibiting me from doing so.

Code not working as intended:

function tweenPose(motor,cframe,speed)
	speed = speed or 1 
	local tweenInfo = TweenInfo.new(speed)
	TweenService:Create(motor, tweenInfo, {["Transform"]=cframe}):Play()

The print confirms that the function gets all the information, but it never makes my character change in any way.

This is on a server sided script, so it can’t be anything related to server/client sides.
(no errors either)


Full code:


I believe tween info doesn’t support CFrame so you will need to convert to a vector on your TweenService:Create() line.


TweenService does support CFrame but there are a few issues with trying to tween the Transform property.

  • The Transform property doesn’t replicate. If you update this on the server changes will not be replicated to the client.
  • The Transform property should be updated using the Stepped signal of RunService, if updated using RenderStepped or other signals then your updates can be overridden by the currently running animations.
  • TweenService will update it’s tween using the Heartbeat signal on the server and the RenderStepped signal on the client so it is not suitable for updating the Transform property.

Here is some example code which updates the transform property of the local character.

local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

if not LocalPlayer.Character then

local character = LocalPlayer.Character
if not character.Parent then

local humanoid = character:WaitForChild("Humanoid")

-- Example of rotating the RightUpperArm of an R15 character by 90 degrees
local function updateCharacterTransforms()
	local rightArm= character:FindFirstChild("RightUpperArm")
	if not rightArm then

	local shoulderJoint = rightArm:FindFirstChild("RightShoulder")
	if not shoulderJoint then

	local newTransform = shoulderJoint.Transform * CFrame.Angles(math.rad(90), 0, 0)
	shoulderJoint .Transform = newTransform

local runServiceConn;
-- Note use of Stepped signal
runServiceConn = RunService.Stepped:connect(function()

local humanoidDiedConn;
humanoidDiedConn = humanoid.Died:connect(function()
	runServiceConn = nil
	humanoidDiedConn = nil

For code that replicates tweening to all clients you might want to look at the following:


Thanks for the in-depth response,
but that code isn’t doing anything either

(neither on the client side nor the server side)


Whoops, it was looking for the LeftShoulder joint in the right arm. I’ve updated the code and it should work client side now.