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.
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)
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)
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