Trying to animate a player with a vent

i’m trying to make this vent open when the character triggers the proximity prompt which is on the vent. the animation works; however, it only works on the character and the vent doesn’t work. does anyone know what’s going on? i’ve got a motor6d in the HRP and one in the vent.

problem:
https://gyazo.com/f6e4b3ab7ab33af859fc5367706c73fc

animation:
https://gyazo.com/1b8c72189bfe6943c3ac7408d99d755c

script:

local prox = script.Parent.ProximityPrompt

prox.Triggered:Connect(function(plr)
	local hum = plr.Character:WaitForChild("Humanoid")
	local anim = script.Animation
	local animtrack = hum.Animator:LoadAnimation(anim)
	
	animtrack:Play()
	
end)

motor6d’s:
image

1 Like

You need two attachments and you gotta set them for C0 and C1

Have one in the HumanoidRootPart and the other one in that model.

1 Like

wow, thank u so much! it almost works but unfortunately its kind of opening up sideways instead of up.
u saved me days of searching for this tho fr. i wouldn’t have known how to do this so ty!
gif:
https://gyazo.com/ac70bc76052d46765f9e39d39187f765

here’s the script:

local prox = script.Parent.ProximityPrompt

prox.Triggered:Connect(function(plr)
	local hum = plr.Character:WaitForChild("Humanoid")
	local anim = script.Animation
	local animtrack = hum.Animator:LoadAnimation(anim)
	
	
	local att1 = Instance.new("Attachment", plr.Character.HumanoidRootPart)
	local att2 = Instance.new("Attachment", workspace.ventYUH.ventBase)
	
	
	local ventyuh = workspace.ventYUH
	ventyuh.ventBase.Vent.C0 = att1.CFrame
	ventyuh.ventBase.Vent.C1 = att2.CFrame
	
	animtrack:Play()
	
end)
1 Like

I have a feeling that it’s just the animation that makes it look like your player’s character is backing up but in reality it’s position is still at where it was standing before the animation

If that makes sense.

1 Like

yes! nonetheless u pretty much solved what ive been looking for. ill try and make some touch ups to get it to work but tysm!

1 Like