Help with 1 player 2 characters system

Hello, I was playing around in studio trying to create a 1 player 2 character system,
This is where one player presses wasd, spacebar and moves their character, but there’s another character that’s moved exactly the same as the main one:

In the video you can see that my second character is found inside of the first MAIN character, and when I check the properties of the humanoid, the character is being moved, and also the jump property is being turned on, but the second character doesn’t move or jump for a few seconds.

After waiting a bit, the character starts to rubber band, and then starts working as it should’ve been.

My problem is that I want this character to move immediately when the main character spawns in.

3 Likes

This was done only with the player control module, and I’m using the Humanoid:Move() function for the second character

1 Like

I think I had a similiar issue I’ve even used coroutine to try and fix my own but it still lags a bit.

All I can really say is try using coroutine/task library. You can try using coroutine.create to make it happen around the same time, or task.spawn/coroutine.wrap to make the character move immediately. Or maybe combine both.

I did that, but it doesn’t work.
I don’t think these move functions have anything that stops the code from running.

And in the video I sent, you can see that the move values are being changed in the second character’s humanoid which is very annoying.

For some reason it just has a long wait before it starts doing actions.

Ok wait, is your NPC anchored? Like do you anchor it and then unanchor it?

Actually what you could try doing is doing these actions on the client because the client will react faster than the server would. Unless you’re already doing it on the clients. With the coroutines/task library functions too.

I said multiple times, I’m doing all of this on the client.
And no, its not anchored…

I might have found the solution

Cuz my issue was I was trying to make an NPC and a player unanchor their HRPs at the same time and it would delay the NPC. So instead you could change the hum walkspeed I was thinking, from 0 to 16. But I get your problem is different.

Maybe you could try enabling/disabling the scripts when whatever happens happens. I did that and the reactions from the NPC were faster.

Thanks for your time, if you’re looking for a solution too, this is it:

In the physics tab of roblox studio settings, you can enable show network owners:

This will show you who owns the parts, and if a player owns the second character, the movement will be very smooth:
image

You can do this by doing BasePart:SetNetworkOwner(plr) on each part of the second character.

And lastly, the reason why it started to work only a minute later, is because of how network ownership works, so the player somehow got the ownership of that character only a bit after.

Perfect… mwahahahahahahahahaha

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.