Pilot Mode NPC's

so me and my friend are making a game and, one of the moves we want to have is the ability to pilot your NPC next to you (you have floating npc next to you). by pilot i means like when im press C it will make me have my camera on the npc and i can move around like its my character, and when im press C again he returned… and i can use my character normal. im not ask for script, just want to know what ways to do this because it seems like very hard task, and i not know what things i could do to get a result like this

  1. how i move the npc with keycodes (should i spam if input.KeyCode == Enum.KeyCode.W, input.KeyCode == Enum.KeyCode.A etc…)
  2. how i keep character in place while still moving npc (thought of using isrunning and then setting walkspeed to 0 but then isrunning wont be activate…)
  3. how to put camera on npc, will i be able to make it moveable like a normal player character? (like rotate around you)

you guys have idea? let me know, if you do well be safe wash you hands. i hope to see you in next reply

2 Likes

Note: This is just a simple example not a full-Blown tutorial…

You would need to set the player’s character to the one you want via:

LocalPlayer.Character = npc

You would also need to make a keybind which binds the 'C' key to a function via:
game:GetService("UserInputService").InputBegan
--or--
game:GetService("ContextActionService"):BindAction()

Since i dont know how the ROBLOX ControlScript works, I think you would need to create a custom ControlModule in StartePlayer.StarterPlayerScripts....

that would be very hacky to set the localplayers character to the npc right? i don’t think that is something reliable and or efficient

edit: ik how to use UIS, im just wondering question 1

Well yes but this is what roblox ‘technically’ does when loading the Character model… But if you dont want to do that you would actually need to make a custom control module which has a function which sets the players character