The answer provided there is just the snippet of code he gave that makes it work. I recommend experimenting with it more as the system works quite well if set up properly. Also, I recommend you use WorldRoot | Documentation - Roblox Creator Hub instead of Ray.new
The system works by connecting a Heartbeat event to some code that will cast a ray and if you’re on RaftTop, it will update your position to the relative CFrame you should be at. The core of the code and math is in the heartbeat event connection, so if you take a brief look at it you should be able to extract the core pieces you need from it and piece it together in whatever your current system is for it to work.