I’m trying to make a script inside of an attachment where interacting with the ProximityPrompt moves the player upwards for a limited amount of time (basic climbing). Using the help of a scripter friend (i’m a builder and am VERY unexperienced with scripting), I was able to come up with this:
script.Parent.ProximityPrompt.Triggered:connect(function(player)
--trying to make a climb script
local prompt = script.Parent.ProximityPrompt
local character = player.Character
local root = player.Character.HumanoidRootPart
local velocity = Instance.new("VectorForce",player.Character.HumanoidRootPart)
velocity.Attachment0 = root.RootRigAttachment
velocity.Force = Vector3.new(0, 500, 0)
script.Parent.ProximityPrompt.Enabled = false
end)
It functions, but the issue I have right now is that the player doesn’t move upwards when pressing the button, and instead just moves them higher when they jump like this:
The intention for the final result is to simply take control away from the player temporarily (which i know how to do but haven’t done yet) and make them move upwards with an animation.
That might help, but looking at the properties of a HumanoidRootPart, there doesn’t seem to be a property called Velocity and the value called AssemblyLinearVelocity doesn’t seem to change on a HumanoidRootPart, even with the loop on. I tried using this with both the Velocity and AssemblyLinearVelocity properties and nothing really happens so I personally think using a velocity instance would be better, but that doesn’t work too well either.
Does velocity work when the player is anchored? If it does, you could anchor the player to stop them from moving, animations still work when players are anchored.