Help with creating a script that lets you control 2 character models with different keybinds

I’m looking for a way to control and (locally) clone a character model of the player to create a sort of 2-player obby. I want the original player model to keep the WASD + Space keybinds but I want the cloned model to use IJKL + Space keybinds (the jump is synced between both models). The camera position won’t have to be updated as it’s going to be in Scriptable the entire time. Also, holding space should allow for both characters to constantly jump just like normal.

Issue is, I don’t know how to do this and I really do not want to give up on something as unique as this so I would like as much help as possible!

I have tried many, MANY solutions such as scouring around 20+ devforum posts, going onto the Roblox scripting documentation, and even asking people in a server online. The closest I’ve gotten is this post which has a file where you can control two characters with one client, perfect for what I’m trying to do except there are a few issues.

First, the camera is a top-down view, I’m trying to make it looking straight. Second, these players are not clones of your own, rather they are spawned in upon loading into the game.

I have tried to reach so many solutions but just nobody had ever thought of this before apparently. As far as I’m concerned this is probably going to have something to do with ContextActionService and/or UserInputService.

A video for reference has been attached just in case.
If there’s potential for any amounts of help it would be greatly appreciated, thank you!

2 Likes

I think this should help.

Make sure the second character is moved first before creating the welds


Another thing you can do is try to mirror the main character instead of controlling both at the same time.
This is an open sourced game that can help you how to do that if you look through the scripts

I just realized I read the post wrong. Here is a post that might help

Okay I just realized you linked it already, I’m quitting developing now dgjsjtsjsidkkdek

Can you show us the script?
I might be able to modify it for you. Have you tried modifying it yourself yet?

I’ve managed to modify the keybinds portion but anything to do with the camera will instantly break it so there’s no luck there.

Also, the scripts used are quite large. You’d have to look at them yourself.

Try and use angularvelocity to move the 2nd player

Sorry, I am unable to look for myself.

Did you check the output for errors?

I am trying something new and just reading through all the code inside of the “2 Characters 1 Client” game. Turns out you need barely any of these scripts for it to run, the most important seems to be the ControlScript followed by the CharacterHandler. I decided to fork the ControlScript and try inserting it into the other place. Although it doesn’t work, there are zero errors being outputted so I feel as though this is very close to the answer.