I’m currently testing methods to transfer a player’s control of their character to another model (with a humanoid). I’ve tried welding the player’s character to the model in question, which works, but it won’t work in every situation I have planned for my game. The best solution to this is probably to use player.Character, but I’m not really sure how I’d move that from rig to rig.
This is what I’ve been working on so far. Upon clicking a part, you should transfer player.Character to the rig in question starting at line 5 (which is where I’m stuck, I have no idea how to do this).
i do it by setting .Character to nil then the new character to the model u want and changing workspace.CurrentCamera.CameraSubject to the character models humanoid and you should be good to go
Script is within the part that holds the same click detector, it’s also not a local script (not sure if that would cause a problem, though). Here’s the whole thing so far:
There are no errors that I get from this code, however, it doesn’t seem to work the way it should. Although the player’s Character is transferred, you can’t control the new character and the camera seems to stay in place. Maybe there’s something I overlooked?
Maybe because you have a variable player, which I guess it’s still not a localscript, and then the parameter which has the same name??? Delete the player variable.
Inside the humanoid / new character there must be a local animate script, you can do a test and copy the one of your own character, and move all the code a little down and as the first line put this
Check If Every part inside the model of the new character is anchored including HumanoidRootPart Make sure that its Unachored or else you wouldn’t be able to control it.