How do I make a simple ladder?

I am currently working on a Minecraft parkour world, and I am trying to get a simple ladder setup. All it needs to do is push the player to the top when they get on it. I can’t use teleporting, like some worlds, as it wouldn’t work in the context of my world. I have been running around the internet for a while trying to find a solution to this, but I haven’t had any luck finding information relevant to VRChat world development.

Thanks!

Here is some sample code to hopefully help you out with this, All this code does is if the player steps into a collider (Your ladder collider) It will push the player up as long as they are walking into it then when they don’t keep walking forward it will take them down the ladder. Much like Minecraft’s Ladders. This may not be exactly what you are looking for, but can at least get you started.

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;

public class LadderClimbing : UdonSharpBehaviour
{
public float climbSpeed = 1.0f; // Speed at which the player climbs
private bool isClimbing = false;
private Vector3 lastPosition;

private void OnTriggerEnter(Collider other)
{
    if (other.gameObject.layer == LayerMask.NameToLayer("Player"))
    {
        isClimbing = true;
        lastPosition = other.transform.position;
    }
}

private void OnTriggerExit(Collider other)
{
    if (other.gameObject.layer == LayerMask.NameToLayer("Player"))
    {
        isClimbing = false;
    }
}

private void Update()
{
    if (isClimbing)
    {
        // Check if the player is moving forward
        if (transform.position.y > lastPosition.y)
        {
            // Push the player up
            transform.position += Vector3.up * climbSpeed * Time.deltaTime;
        }
        else
        {
            // Take the player down
            transform.position -= Vector3.up * climbSpeed * Time.deltaTime;
        }

        lastPosition = transform.position;
    }
}

}

I mean since we are talking about local player, instead of normal trigger enter & layer check, you can just use:

OnPlayerTriggerEnter(VRCPlayerApi player)
{
if(player.isLocal)
{
isClimbing = true;
}
}