I tried my best but I didn’t find a way to do that, sorry.
I’ve actually done this before. It got a tiny bit complicated and the system wasn’t perfect but it worked. Sadly I don’t have access to my old creation so I an unable to copy/paste the script here. I do know that it used Humanoid | Roblox Creator Documentation and Humanoid | Roblox Creator Documentation, both on the client and the server. It also cloned the players character and set the players character to the cloned character. The cloning part is why I say it wasn’t perfect.
Sadly I forgot the password to my old account Profile - bob25620 - DevForum | Roblox and wasn’t able to recover it due to Roblox customer service giving me the runaround, even after providing the information they needed. So I gave up and created a new account. Anyways, as I was saying I lost all my game progress from that account and all my previous projects. Despite this I am sure that I can create a working script(s) for you if you give me until tomorrow, unless someone else creates one with the information I’ve given. Especially since I’ve grown in scripting knowledge since then to the point that everything I was previously working on is obsolete to what I can do or how I would make it now.