Animating the player on/connected to a part?

Would I need to connect them to the part, or anchor then position them on the part, or maybe make an animation with both the part and the player? the part itself doesn’t need to be animated so I figured I could position the player on the part then run the animation. for reference its a bed.

I thought about using a seat but I wasn’t sure

1 Like

All of your ways will work.

But if you pick positioning the character and then anchoring them on the part, MAKE SURE to only anchor the HumanoidRootPart because the limbs need be unanchored to be move when you play the animation

2 Likes

is one method particularly better than the others or are they all about the same?

1 Like

Connecting the player to the part is the best for organization, simplicity, and it allows the part to work with less code making your part more optimized, While this will not make much of a difference, if you have a lot, It will be way easier for devices to run.

There is many other reason and I am not going to list them all but connecting the player to the part is better overall.

1 Like

How would I connect the player to the part? I can only find people connecting the part to a player. I tried to reverse the code by just swapping the welds but it ended up with the part inside of the player.

Your animation needs to be for the specific part, you cannot animate a classic sword and try to drop in any sword, it will not work. You need to animate the part beforehand with the specific object.

Connecting the part to the player is really the only way to do it.

1 Like

Which from what I know is just welding it to the player right? I’m not referring to animating it yet I am just trying to get the HumanoidRootPart connected to the part, and having the character be inside of the part or on it or whatever, currently this happens:

local ProximityPrompt = script.Parent
local Part = ProximityPrompt.Parent
local WeldConstraint = Part.WeldConstraint

ProximityPrompt.Triggered:Connect(function(player)
	local Character = player.Character
	if Character then
		local HumanoidRootPart = Character.HumanoidRootPart
		WeldConstraint.Part0 = HumanoidRootPart
		WeldConstraint.Part1 = Part
	end
end)


In the image above, I interacted with the prompt and what you see was my humanoidrootpart welded to the part but I’m not like on the part or positioned by it
image
I tried setting the humanoidrootparts cframe to the parts cframe in the code after welding but then I just clipped into the ground and still wasn’t like on the part

Then I tried setting the CFrame before welding, then welding afterwards, and this happened:
image
Which is a problem mainly because the part itself moved locations.
I’ve never really messed with stuff like this before, sorry lol