Trying to make a climbing system

So I’m working on a climbing system for my game, but I’ve never done anything of its kind. I kinda need help on what to do or how to do it. One of my friends just gave me this, but I don’t really understand.


If you need me to send anything else, just ask.

Is this for like a 2D game?
Also that isn’t the full script right?

yeah that isnt the full script, also this game isnt 2d.

Okay, thanks for clarifying.

I’m gonna guess the script clings you to a wall and moves you in four directions with WASD?

Also assuming oceanEle means Ocean Elevation. Adjust it if you haven’t because you probably can’t climb under the y of ocean elevation.

yeah, thats what im hoping to make right now

Well, if you were to give it like a cling effect, it would need to check for parts in front of the character with raycast, if it hit a part, anchor the character and move accordingly to keybinds.

Sorry, I fell asleep
I’m going back to sleep now.

How would I do this? I’m not too well experienced with raycasting just yet as I’ve focused on a lot of other things that I shouldn’t have but were good to learn.