How can I move a player on a tweened object?

You can try to use bodyforces instead?

This sounds promising, I’ll try it!

Dashing is built on bodyforces, so I fear if I did it might interfere

Didn’t work… Are there any other solutions? Or at least a more optimized way to get this?

Well i think i actually i found a way to do it with tweening.

llocal Tween = game:GetService("TweenService")
local Part = workspace.Part

local PartAtt = Part:FindFirstChildWhichIsA("Attachment") or"Attachment",Part)
local VC ="VectorForce",Part)
VC.RelativeTo = Enum.ActuatorRelativeTo.World
VC.Attachment0 = PartAtt
VC.Force =,workspace.Gravity * Part:GetMass(),0)

local AP ="AlignPosition",Part)
AP.Attachment0 = PartAtt
AP.MaxForce = math.huge
AP.Mode = Enum.PositionAlignmentMode.OneAttachment
AP.Responsiveness = 3
AP.Position = Part.Position
AP.Enabled = false
AP.Enabled = true

local AO ="AlignOrientation",Part)
AO.Attachment0 = PartAtt
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = Part.CFrame
AO.Enabled = false
AO.Enabled = true

local TweenStart = Tween:Create(AP,,Enum.EasingStyle.Back),{Position = Part.Position +,0,0)})
local TweenEnd = Tween:Create(AP,,Enum.EasingStyle.Back),{Position = Part.Position +,0,0)})

while true do

i just use AligingPosition which Position is being tweened

I just tried it and for me tweenservice also moves the player physically, this is odd.

How could I apply this to a model? I know it has to do with CFrames but attachments are mainly based on vectors if I believe, but I could be wrong.

Did you try my suggestion in the post you linked? Tweened Parts aren’t moved physically, they are ‘teleported incrementally’ so that’s why players will slide off them.
If you use a PrismaticConstriaint to move the Platform the player will stay on it. You’d have to script the “then launches them off” procedure though.

I didn’t use it because I didn’t know if I could change the easing. Can I? If I can, I’ll try it out.

1 Like

Check out LinearResponsiveness.

It’ll work great, but can I subject it to a specific location?

I use this script sometimes created by @nooneisback

Anyways. Make a folder full of the moving parts and put the folders place in Whitelist

-- Localscript inside of StarterCharacterScripts

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

local LastHit
local LastTrainCFrame

local Function
local Function2

local Whitelist = {workspace.Trains}

Function = RunService.Heartbeat:Connect(function()
	local RootPart = player.Character.HumanoidRootPart
	local Ignore = player.Character
	local ray =,,-500,0))
	local Hit, Position, Normal, Material
	if LastHit then
		Hit, Position, Normal, Material = workspace:FindPartOnRayWithWhitelist(ray,{LastHit})
		if not Hit then
			Hit, Position, Normal, Material = workspace:FindPartOnRayWithWhitelist(ray,Whitelist)
		Hit, Position, Normal, Material = workspace:FindPartOnRayWithWhitelist(ray,Whitelist)
	if Hit then
		local Train = Hit
		if not LastTrainCFrame then
			LastTrainCFrame = Train.CFrame
		local TrainCF
		if Train ~= LastHit and LastHit then
			TrainCF = LastHit.CFrame
			TrainCF = Train.CFrame
		local Rel = TrainCF * LastTrainCFrame:inverse()
		LastTrainCFrame = Train.CFrame
		RootPart.CFrame = Rel * RootPart.CFrame
		LastHit = Train
		if Train ~= LastHit then
			LastTrainCFrame = Train.CFrame
		LastTrainCFrame = nil
	if not Function2 then
		Function2 = player.Character.Humanoid.Died:Connect(function()

I said in the original post that this method is buggy. This seems to work more effectively, but I’m still experiencing the same bugs. I forgot to mention in the original post, however, that the player glitches out in weird ways during testing. The result is this:

Is there any way to fix this?

This question has been asked many times. You can try the optimized solution from this thread:

Works, but the optimized solution kinda slides me and is a little bit buggy.

All right, I guess you should try the original solution then. I just thought the optimized one might work with the new API’s better. Then again, I didn’t really test it. Also, nice side scroller and jump effect.

I’m still experiencing the same stuff in the video I sent. I think it needs to index faster to compensate for the very fast speed of the traffic light blocks. (The speed of the traffic light blocks is 0.719 seconds, then it takes about 2.125 seconds for it to go back to original position)

Use roblox’s physics, instead of setting the CFrame constantly. It is more reliable to make the part use roblox’s physics engine instead of setting the parts CFrame.

1 Like

That’s why you set the PrismaticConstraint to Servo. You can set the TargetPosition to one end, then switch it to the other end.

I found out the solution! This is right, but in reality, I just needed to rotate the attachments to get it to go diagonally. Thank you!!

1 Like