How do I make a moving part stick the player to it?

I know there is alot of other topics about this but… Im too smooth brain to figure out how to to tween a bodyposition and a bodygyro… could somebody provide a code sample on how to do this?? and apparently bodyposition has been replaced with alignposition and alignorientation… :confused:

1 Like
local part = ... --Your part which the player should stick to
local srvc_rs = game:GetService("RunService")
local root_part = script.Parent.HumanoidRootPart

srvc_rs.Stepped:Connect(function()
  root_part.CFrame = part.CFrame
end)

put the script in StarterPlayer → StarterCharacter

The code above only moves the part, not the player. You need to move it using physics, so a BodyMover or the non-deprecated movers should do it.

no, using CFrame will also move all the parts connected to it, so if I change CFrame of RootPart, all the parts connected to it (torso head limbs) will move with it

I mean yeah, but I believe the OP wants to move a platform and the player to move along that platform aswell. Not to move the player.

1 Like

oh, sorry I may have misunderstood what op meant

what should I do? about it then? its also more so a single script using collection service. for every moving part.

Hey, do you still need help? If so, I’d like to ask what do you mean? Do you want the part to move to the player, or actually stick to the player? As if it were glued to it.

I want it to move the player with it.

Hmm, do you mean like a moving part like in an obby? If you stand on the part, you’ll move with it.

yes.

30 more characters